Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Marie" <cedric.marie@openmailbox.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] Add BR2_CMAKE_USE_NINJA_BACKEND option
Date: Thu, 26 Jan 2017 18:27:36 +0100	[thread overview]
Message-ID: <901720b443e9bb90750a71c8797bbf0d@openmailbox.org> (raw)
In-Reply-To: <20170125142716.55e7d7b3@free-electrons.com>

Hi Romain, Thomas, and all,

Le 2017-01-24 22:48, Romain Naour a ?crit :
> Yes, something like that but It's just a proposal...
> 
> <package>_SUPPORT_NINJA_BACKEND = YES in the .mk
> (with default to N0)
> 
> ifeq ($(BR2_CMAKE_USE_NINJA_BACKEND),y)
> ifeq ($$($(2)_SUPPORT_NINJA_BACKEND),YES)
> $(2)_CONF_OPTS += -G Ninja
> $(2)_DEPENDENCIES += host-ninja
> endif
> endif

Yes, that could be a good solution to use ninja whenever possible and 
keep other few packages compiling with make backend.

> So, yes Ninja is slightly faster than Make.
> It would be great if you can add some test results in the commit log.

OK, I can do that.


Le 2017-01-25 02:27, Thomas Petazzoni a ?crit?:
> But then that's a bit annoying because we would have to explicitly
> set this option to "YES" on all packages that support the Ninja backend
> (most likely the majority).
> 
> I think it would make more sense to default the other way around, i.e
> default to YES, and set it to NO on the few packages that do not
> properly support the Ninja backend.
> 
> Or maybe better: do not introduce a per-package option for the moment,
> have only the global one, see in practice how many packages work /
> don't work and decide if we need a per-package option, and what default
> value it should have.

OK, but it seems that Romain has already noticed a problem with 
openpowerlink, so it is likely that this option will be necessary - and 
hopefully default to YES (supported).

> So we're saving between 1 and 2 seconds of build time, while host-ninja
> requires building host-python or host-python3 ?
> 
> Seeing those numbers, the whole thing seems really pointless to me.
> You're saving 1-2 seconds of build time, but you've got a full Python
> interpreter to build.
> 
> Would it be possible to get numbers on the overall build time showing
> what Ninja is improving?

Yes, you're right. Unless we use python and ninja from the host if 
available, instead of compiling them, but this is not the right solution 
I suppose (although this is done for CMake!...).

I agree that a few seconds are not much!... And I agree that we are 
loosing much more time to compile host packages.

So, why did I want to introduce this option?

Because I'm not using Buildroot in one-shot mode. I'm developping in a 
Buildroot environment. So I often make foo-rebuild my package, and I'm 
interested in saving time for each rebuild.

I know this is not what Buildroot is designed for. (Yet, there are a few 
things that seem to be present for dev mode (rsync with OVERRIDE_SRCDIR 
for example), so this is not "pure one-shot" either.)

In conclusion, I would say that this option is useful to me - not much, 
just for a few seconds - but maybe makes no sense for buildroot 
upstream, since it increases build time.

It's up to you. I won't be offended if the patch is refused. I don't 
want to introduce something that will break Buildroot philosophy.

Regards,

-- 
C?dric

  reply	other threads:[~2017-01-26 17:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 22:37 [Buildroot] [PATCH 1/2] Add BR2_CMAKE_USE_NINJA_BACKEND option Cédric Marie
2017-01-06 22:37 ` [Buildroot] [PATCH 2/2] Update documentation of CMake infrastructure Cédric Marie
2017-01-25  3:27   ` Thomas Petazzoni
2017-01-21 22:25 ` [Buildroot] [PATCH 1/2] Add BR2_CMAKE_USE_NINJA_BACKEND option Romain Naour
2017-01-23 13:39   ` Cédric Marie
2017-01-24 21:48     ` Romain Naour
2017-01-25  1:27       ` Thomas Petazzoni
2017-01-26 17:27         ` Cédric Marie [this message]
2017-01-30  9:23           ` Thomas Petazzoni
2017-02-01 17:01             ` Cédric Marie
2017-02-01 20:12               ` Thomas Petazzoni
2017-02-03 10:44                 ` Cédric Marie
2017-01-25  1:37 ` Thomas Petazzoni
2017-07-11 11:56 ` Thomas Petazzoni
2017-07-11 13:25   ` Cédric Marie
2017-07-11 13:35     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=901720b443e9bb90750a71c8797bbf0d@openmailbox.org \
    --to=cedric.marie@openmailbox.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox