public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Gilbert <floppym@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Usage of dev-utils/ninja in ebuilds
Date: Sat, 25 May 2013 15:45:06 -0400	[thread overview]
Message-ID: <51A114C2.5070306@gentoo.org> (raw)
In-Reply-To: <20130525211750.61b81a57@TOMWIJ-GENTOO>

[-- Attachment #1: Type: text/plain, Size: 2912 bytes --]

On 05/25/2013 03:17 PM, Tom Wijsman wrote:
> From an user perspective I was wondering if ninja in the Portage tree
> makes use of this faster incremental builds feature. Should I expect
> faster builds when trying this out?
> 

No, you will not see any significant speed increase because we always
start with an empty build directory in an ebuild. Nothing has changed in
that regard.

You may see small (~60 seconds) difference when compiling Chromium due
to faster target dependency resolution.

> From a maintainer's perspective, shouldn't the user be able to choose
> whether ninja or make is used and not the developer? Or does ninja
> really work out for the majority in a way nobody would complain?
> 

As a maintainer, it is nice to know exactly how the software is being
built in case of a bug report. This also helps if we need to report an
issue upstream.

I should clarify: ninja is not a *drop-in* replacement for make; it does
not parse Makefiles. Instead, it uses its own configuration format,
which may be generated using GYP or CMake.

The choice of build system should be transparent to the user. However, I
have no strong personal objection to making it configurable.

> From an upstream perspective, would it be problematic if people use
> make instead of ninja; or wouldn't it translate into problems upstream
> has to resolve? (To me, using ninja instead of make sounds like using
> llvm instead of gcc; correct me if I'm wrong, I'm fairly new to ninja.)
> 

So long as GYP supports emitting makefiles as well as ninja build files,
I don't think this will be a problem.

For Gentoo, I believe phajdan.jr simply chose to switch to ninja to more
closely mimic the normal upstream build process.

>> I'm wondering if we should create a more global function for calling
>> ninja in a consistent way. Maybe we should introduce a NINJAOPTS
>> variable for users to set in make.conf. Should we create a new eclass
>> for this, or just stick it in eutils?
> 
> If we don't allow the user to pick which make system is preferred,
> which I tried to suggest above; then I would prefer that we introduce
> a NINJAOPTS variable like you suggest to go alongside MAKEOPTS.
> 
> In the case the user is able to choose which make system is preferred,
> then MAKEOPTS should probably apply to that make system; unless we allow
> maintainer's to override the user, then splitting them is back in favor.
> 

Another thought would be to mimic scons-utils.eclass, which utilizes a
filtered copy of MAKEOPTS if SCONSOPTS is not defined.

> But well, this is based on preliminary thoughts without really
> properly knowing what the advantages and disadvantages here are.
> 

I believe the only real advantage to using ninja for building chromium
is to follow upstream's default build configuration. It should be pretty
transparent to the end user.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

  reply	other threads:[~2013-05-25 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25 18:48 [gentoo-dev] Usage of dev-utils/ninja in ebuilds Mike Gilbert
2013-05-25 19:17 ` Tom Wijsman
2013-05-25 19:45   ` Mike Gilbert [this message]
2013-05-26  3:01     ` "Paweł Hajdan, Jr."
2013-05-25 21:09   ` Luca Barbato
2013-05-26  1:53 ` [gentoo-dev] " Ryan Hill
2013-05-26  1:55   ` Mike Gilbert
2013-05-26  2:00   ` Alex Xu
2013-05-26  4:23     ` Ryan Hill

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=51A114C2.5070306@gentoo.org \
    --to=floppym@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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