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/12419003/,
and expected to work with https://codereview.chromium.org/66303010/.
Note: Goma team suggest not to put gomadir in PATH if you use use_goma option.
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).
According to the review comment, ANDROID_GOMA_WRAPPER has already been
obsoleted. ANDROID_GOMA_WRAPPER will be just ignored after this change.
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
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #Patch Set 7 : #
Total comments: 4
Patch Set 8 : #Patch Set 9 : #Patch Set 10 : #Messages
Total messages: 17 (0 generated)
|