Add USE=ninja support to chromeos-chrome. [chromiumos/overlays/chromiumos-overlay : master]

0 views
Skip to first unread message

Taiju Tsuiki (Code Review)

unread,
May 9, 2012, 12:55:17 AM5/9/12
to
Taiju Tsuiki has uploaded a new change for review.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................

Add USE=ninja support to chromeos-chrome.

BUG=chromium-os:24072
TEST=None

Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
---
M chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
1 file changed, 56 insertions(+), 26 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/overlays/chromiumos-overlay refs/changes/10/22210/1
--
To view, visit https://gerrit.chromium.org/gerrit/22210
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

Chris Wolfe (Code Review)

unread,
May 9, 2012, 11:48:30 AM5/9/12
to Taiju Tsuiki
Chris Wolfe has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 2: (8 inline comments)

Quick drive-by with the things that jumped out at me. Don't worry about ticking them off now.

....................................................
File chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
Line 129: if ! use ninja; then
I'd really prefer we not do this -- moving the output files around is a good way to confuse people. For any workflow other than sshfs-mounting the build directory using /var/cache should be faster (the ebuild install can then use hard-links).

Line 210: BUILD_TOOL_FLAGS=(
Is it always safe to pass these flags to the make generator? I think we're probably okay, but it makes me paranoid.

Line 522: export GOMANINJA=${GOMANINJA:-/home/$(whoami)/depot_tools/ninja-linux6}
Unused?

Line 523: export ENINJA="${ENINJA:-/home/$(whoami)/depot_tools/ninja-linux64}"
Prefer NINJA, so nobody will expect eutil-like behavior.

Line 701: src_configure() {
Feels like "do runhooks in src_configure" should be landed as a separate refactoring. I agree with it (and proposed it a while ago), but it needs to be tested against the ebuild-based tools.

Line 716: export CC_host=gcc
Believe these should be $(tc-getBUILD_CC) and similar.

Line 778: $(use chrome_internal && default_extensions) \
missing echo

These use&&echo blocks would be simpler in EAPI=4 with usex, but wouldn't do that without input from one of the Portage gurus.

Line 956: if use ninja; then
Getting back to the same cache dir should also avoid this.
Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>
Gerrit-Reviewer: Chris Wolfe <cwo...@chromium.org>
Gerrit-Reviewer: Taiju Tsuiki <tz...@chromium.org>

Mike Frysinger (Code Review)

unread,
May 9, 2012, 1:21:27 PM5/9/12
to Taiju Tsuiki, Chris Wolfe, Mike Frysinger
Mike Frysinger has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
Line 117: if use ninja; then
do not `use` in global scope. in this case, this variable is only used in one place, so move it to there -- set_build_defines.

Line 778: $(use chrome_internal && default_extensions) \
usex() is in eutils.eclass, so we don't need to update to EAPI=4 for that

Line 783: $(use chrome_internal && echo default_extensions) \
why are default_extensions now dependent upon USE=chrome_internal ? they weren't before.
Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>
Gerrit-Reviewer: Chris Wolfe <cwo...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Taiju Tsuiki <tz...@chromium.org>

Chris Wolfe (Code Review)

unread,
May 10, 2012, 3:20:27 PM5/10/12
to Taiju Tsuiki, Mike Frysinger
Chris Wolfe has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
Line 783: $(use chrome_internal && echo default_extensions) \
Believe default_extensions without internal is a no-op for make, but it errors in ninja.

Not sure whether there will ever be non-internal default extensions, but I don't know of a reason why not.
Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

Mike Frysinger (Code Review)

unread,
May 10, 2012, 3:32:02 PM5/10/12
to Taiju Tsuiki, Chris Wolfe, Mike Frysinger
Mike Frysinger has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
Line 783: $(use chrome_internal && echo default_extensions) \
how is hterm pulled in (used for crosh) ?
Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

Chris Wolfe (Code Review)

unread,
May 10, 2012, 3:51:16 PM5/10/12
to Taiju Tsuiki, Mike Frysinger
Chris Wolfe has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
Line 783: $(use chrome_internal && echo default_extensions) \
chromeos-assets package installs hterm down under /usr/share, though I don't know what prompts chrome to pick it up.
Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

Taiju Tsuiki (Code Review)

unread,
May 11, 2012, 2:38:16 AM5/11/12
to
Taiju Tsuiki has uploaded a new change for review.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................

Add USE=ninja support to chromeos-chrome.

This CL add ninja USE flag and ninja support to chromeos-chrome.

BUG=chromium-os:24072
TEST='Emerging chromeos-chrome should finish successfully.'

Change-Id: I8120b277dee27bde09b34a10ba47927fd392ce86
---
M chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
1 file changed, 58 insertions(+), 29 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/overlays/chromiumos-overlay refs/changes/50/22450/1
--
To view, visit https://gerrit.chromium.org/gerrit/22450
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8120b277dee27bde09b34a10ba47927fd392ce86
Gerrit-PatchSet: 1

Taiju Tsuiki (Code Review)

unread,
May 11, 2012, 2:40:16 AM5/11/12
to
Taiju Tsuiki has abandoned this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 1: Abandoned

Duplication. Failed to upload.
https://gerrit.chromium.org/gerrit/22210
Gerrit-MessageType: abandon

Taiju Tsuiki (Code Review)

unread,
May 11, 2012, 2:50:26 AM5/11/12
to Chris Wolfe, Mike Frysinger
Taiju Tsuiki has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................




Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

Mike Frysinger (Code Review)

unread,
May 11, 2012, 3:59:55 AM5/11/12
to Taiju Tsuiki, Chris Wolfe, Mike Frysinger
Mike Frysinger has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 3: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
Line 771: BUILDCMD="${NINJA} ${NINJAOPTS} $(use verbose && echo -v) -C ${builddir_name}/${BUILDTYPE}"
declare BUILDCMD local, and use an array:

BUILDCMD=(
${NINJA}
${NINJAOPTS}
...
)

Line 789: time ${BUILDCMD} "${BUILD_TARGETS}" || die "compilation failed"
then you do:

time "${BUILDCMD[@]}" "${BUILD_TARGETS[@]}" || die
Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

Taiju Tsuiki (Code Review)

unread,
May 15, 2012, 12:53:52 AM5/15/12
to Chris Wolfe, Mike Frysinger
Taiju Tsuiki has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................




Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

Mike Frysinger (Code Review)

unread,
May 16, 2012, 3:34:38 PM5/16/12
to Taiju Tsuiki, Chris Wolfe, Mike Frysinger
Mike Frysinger has posted comments on this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 4: (4 inline comments)

getting closer ;)

....................................................
File chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild
Line 205: BUILD_TOOL=ninja
btw, if you wanted to be tricky, you could do:

BUILD_TOOL=$(usex ninja ninja make)

Line 709: # TODO(tzik): Use $(tc-getBUILD_CC) after fixing compile error.
why can't you use tc-getBUILD_CC now ? by default, it should evaluate to the same thing: gcc

Line 716: # TODO(tzik): Move to some appropriate place BEFORE LAND.
i have no idea what this is saying

Line 723: export GYP_GENERATOR_FLAGS="${BUILD_TOOL_FLAGS[@]}"
[*] rather than [@]
Gerrit-MessageType: comment
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>

David James (Code Review)

unread,
Dec 22, 2012, 5:49:47 PM12/22/12
to Taiju Tsuiki, Mike Frysinger, Zdenek Behan
David James has abandoned this change.

Change subject: Add USE=ninja support to chromeos-chrome.
......................................................................


Patch Set 4: Abandoned

Thanks for this patch. I integrated in these changes in CL:40037 and ninja support works now.

Thanks!
Gerrit-MessageType: abandon
Gerrit-Change-Id: I402e9252d79a7311ecc43f9273ea3f967509d59e
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Taiju Tsuiki <tz...@chromium.org>
Gerrit-Reviewer: David James <david...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: Taiju Tsuiki <tz...@chromium.org>
Gerrit-Reviewer: Zdenek Behan <zbe...@chromium.org>
Reply all
Reply to author
Forward
0 new messages