DescriptionAdd use_goma for GYP_DEFINES
If use_goma is specified in GYP_DEFINES, gomacc is automatically set as
CC wrapper and CXX wrapper. It uses the default goma directory if the gomadir
option is not given. No need to fix PATH when running ninja (or make).
This is the revival of https://codereview.chromium.org/69293004/.
In https://codereview.chromium.org/69293004/, I removed ANDROID_GOMA_WRAPPER
code, which is actually used. This code supports both way of enabling goma
for Android. You can set GOMA_DIR or you can set -D use_goma=1.
Currently, this works well with ninja (default build system of chromium).
It does not work well with make in some case (e.g. build on linux with make).
Example 1
$ GYP_DEFINES="clang=1 use_goma=1" build/gyp_chromium
(no need to set CC/CXX at this stage)
build.ninja will have
cc = ${HOME}/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang
cxx = ${HOME}/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++
The user can run ninja without setting PATH or so.
$ ninja -C out/Release -j100
Example 2
$ GYP_DEFINES="use_goma=1 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
BUG=173686
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237900
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238630
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #
Total comments: 1
Messages
Total messages: 9 (0 generated)
|