Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Issue 12419003: Add gomadir for GYP_DEFINES (Closed)

Created:
7 years, 9 months ago by ukai
Modified:
4 years, 4 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Add gomadir for GYP_DEFINES If gomadir is specified in GYP_DEFINES (and use_goma=1, which is default), it will start goma compiler_proxy and generates build rules file to use goma, so no need to fix PATH when running ninja (or make). Note: gomadir should not be in PATH with this use case. Currently, it is for ninja (and for make in some cases). If ANDROID_GOMA_WRAPPER is defined, its directory will be used as gomadir's default (for backward compatibility). Example 1 $ GYP_DEFINES=gomadir=/path/to/goma build/gyp_chromium build.ninja will have cc = /path/to/goma/gomacc gcc cxx = /path/to/goma/gomacc g++ user can run ninja without setting PATH or so. $ ninja -C out/Release -j100 It doesn't generate goma-ready Makefile yet in this case (because no CC in make_global_settings) Example 2 $ GYP_DEFINES="clang=1 gomadir=/path/to/goma" build/gyp_chromium (no need to set CC/CXX at this stage) build.ninja will have cc = /path/to/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang cxx = /path/to/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ user can run ninja without setting PATH or so. $ ninja -C out/Release -j100 Makefile will be ifneq (,$(filter $(origin CC), undefined default)) CC = $(abspath /usr/local/google/home/ukai/src/goma/client/out/Release/gomacc) $(abspath third_party/llvm-build/Release+Asserts/bin/clang) endif ifneq (,$(filter $(origin CXX), undefined default)) CXX = $(abspath /usr/local/google/home/ukai/src/goma/client/out/Release/gomacc) $(abspath third_party/llvm-build/Release+Asserts/bin/clang++) endif .. CC.target = $(CC) CXX.target = $(CXX) user can run make without setting PATH or so. $ make BUILDTYPE=Release -j100 R=iannucci@chromium.org,thakis@chromium.org,michaelbai@google.com,peter@chromium.org BUG=173686

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix /dev/null -> NUL on Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -27 lines) Patch
M build/common.gypi View 1 8 chunks +77 lines, -27 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
ukai
7 years, 9 months ago (2013-03-05 08:03:40 UTC) #1
ukai
ping
7 years, 9 months ago (2013-03-07 05:38:41 UTC) #2
Nico
When picking multiple reviewers, it's usually a good idea to tell everyone what they should ...
7 years, 9 months ago (2013-03-07 17:15:49 UTC) #3
ukai
On 2013/03/07 17:15:49, Nico wrote: > When picking multiple reviewers, it's usually a good idea ...
7 years, 9 months ago (2013-03-08 03:42:16 UTC) #4
iannucci
https://codereview.chromium.org/12419003/diff/1/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/12419003/diff/1/build/common.gypi#newcode662 build/common.gypi:662: '<!(python <(gomadir)/goma_ctl.py ensure_start >/dev/null 2>/dev/null && echo ok)' It's ...
7 years, 9 months ago (2013-03-08 04:04:09 UTC) #5
ukai
https://codereview.chromium.org/12419003/diff/1/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/12419003/diff/1/build/common.gypi#newcode662 build/common.gypi:662: '<!(python <(gomadir)/goma_ctl.py ensure_start >/dev/null 2>/dev/null && echo ok)' On ...
7 years, 9 months ago (2013-03-08 06:52:05 UTC) #6
iannucci
https://codereview.chromium.org/12419003/diff/1/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/12419003/diff/1/build/common.gypi#newcode4114 build/common.gypi:4114: # in make_global_settings yet. On 2013/03/08 06:52:05, ukai wrote: ...
7 years, 9 months ago (2013-03-08 06:54:10 UTC) #7
Nico
7 years, 9 months ago (2013-03-11 17:48:45 UTC) #8
I too am not sure if starting goma at gyp time will work well.

Most confusion seems to be caused by people not setting their PATH correctly,
which is solved by the _wrapper parts of this CL. Maybe we should require people
start up goma manually for now (i.e. omit that part from this CL) and see if
that's good enough? If people continue to get that wrong, we can add that part
later.

Powered by Google App Engine
This is Rietveld 408576698