bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix buil


From: Eric Bavier
Subject: bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile).
Date: Sun, 22 Oct 2017 16:42:16 -0500

On Sun, 22 Oct 2017 18:50:57 -0700
address@hidden (Ludovic Courtès) wrote:

> Hi Maxim,
> 
> Maxim Cournoyer <address@hidden> skribis:
> 
> > Ludovic Courtès <address@hidden> writes:
> >  
> >> * guix/build/compile.scm: New file.
> >> * Makefile.am (MODULES): Add it.
> >> * build-aux/compile-all.scm: Use it.
> >> (warnings, file->module, load-module-file)
> >> (%default-optimizations, %lightweight-optimizations)
> >> (optimization-options, compile-file*): Remove.
> >> <top level>: Use 'compile-files'.
> >> * guix/build/pull.scm (%default-optimizations)
> >> (%lightweight-optimizations, optimization-options): Remove.
> >> (build-guix): Rewrite as a call to 'compile-files'.
> >> * guix/discovery.scm (file-name->module-name): Export.
> >> ---
> >>  Makefile.am               |   1 +
> >>  build-aux/compile-all.scm |  92 ++++----------------------
> >>  guix/build/compile.scm    | 165 
> >> ++++++++++++++++++++++++++++++++++++++++++++++
> >>  guix/build/pull.scm       | 105 ++++++++---------------------
> >>  guix/discovery.scm        |   4 +-
> >>  5 files changed, 209 insertions(+), 158 deletions(-)
> >>  create mode 100644 guix/build/compile.scm  
> >
> > [...]
> >
> > This and the other patches in this series look fine to me.  
> 
> Awesome, thanks for looking.
> 
[...]
> Speaking of the “make -j” patch, on IRC Eric Bavier suggested that it
> didn’t work as advertised because $MAKEFLAGS didn’t contain the “-j”
> flag; I just checked and it does contain it here (with GNU make 4.2.1).
> So no problem after all?

The behavior changed in version 4.2.  From the Changelog:

2016-04-04  Paul Smith  <address@hidden>

        Preserve the real value of -jN in MAKEFLAGS using jobserver.
        Previously if the jobserver was active, MAKEFLAGS would contain only
        the -j option but not the number (not -j5 or whatever) so users
        could not discover that value.  Allow that value to be provided in
        MAKEFLAGS without error but still give warnings if -jN is provided
        on the command line if the jobserver is already activated.

        * NEWS: Discuss the new behavior.
        * os.h, posixos.c, w32/w32os.c: Return success/failure from
        jobserver_setup() and jobserver_parse_auth().
        * main.c (main): Separate the command line storage of job slots (now
        in arg_job_slots) from the control storage (in job_slots).  Make a
        distinction between -jN flags read from MAKEFLAGS and those seen
        on the command line: for the latter if the jobserver is enabled then
        warn and disable it, as before.
        * tests/scripts/features/jobserver: Add new testing.


And from NEWS for the 4.2 release:

* The amount of parallelism can be determined by querying MAKEFLAGS, even when
  the job server is enabled (previously MAKEFLAGS would always contain only
  "-j", with no number, when job server was enabled).


It Would Be Nice if the functionality worked for older versions of make
that people might have on their systems.  Using the jobserver directly
would require quite a bit of work for the current patch set, but I
wonder if there is another way to determine the -jN parameter for
make<4.2 that we could use.  Maybe simply polling the jobserver fds at
the start?

`~Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]