make -j1 produces four C++ instances

Ian Lepore ian at freebsd.org
Tue Dec 3 16:28:34 UTC 2019


On Tue, 2019-12-03 at 08:20 -0800, bob prohaska wrote:
> On Tue, Dec 03, 2019 at 04:06:08PM +0000, greg at unrelenting.technology
>  wrote:
> > December 3, 2019 6:55 PM, "bob prohaska" <fbsd at www.zefox.net>
> > wrote:
> > 
> > > Has the -j feature for make been changed/removed? 
> > > 
> > > IIRC, one could in the past limit the number of jobs created
> > > while compiling software by using 
> > > make -jN 
> > > on the command line. Now it seems that
> > > make -j1 
> > > spawns four instances of C++ while trying to compile
> > > www/chromium.
> > 
> > make -jN won't necessarily do anything when make spawns other build
> > systems
> > which do their own parallelism.
> > (*some* systems can integrate with GNU make, see e.g.
> > https://github.com/ninja-build/ninja/issues/1139 )
> > 
> 
> Which leads to:
> https://github.com/ninja-build/ninja/issues/1441
> 
> > Chromium is mostly built using their own GN system,
> > the backend of which actually is ninja btw
> > 
> 
> Implying the behavior is controlled by ninja, not make. 
> 
> Is there some other way to restrain parallelism in
> compiling www/chromium? 
> 
> Thanks for replying!
> 
> bob prohaska
> 

When building ports, it's controlled by make variables which can be set
in make.conf or on the command line.  The ports build machinery does
what it needs to, to pass that value down into whatever build system is
used within the port (cmake or ninja or whatever).

  make MAKE_JOBS_NUMBER=2     # like -j2
  make DISABLE_MAKE_JOBS=yes  # disables multiple jobs completely

-- Ian




More information about the freebsd-arm mailing list