Add sccache option to bootstrap (#12582)
* Add sccache option to bootstrap Couldn't see a CC wrapper style option for gyp so we inject the sccache commands directly into the generated ninja files. * Use CC_wrapper * Update toolchain.gypi * s/sccache/cc_wrapper
This commit is contained in:
parent
51b7322a0f
commit
c1381ac598
2 changed files with 16 additions and 0 deletions
|
@ -110,6 +110,8 @@ def parse_args():
|
||||||
help='The static library path of libchromiumcontent.')
|
help='The static library path of libchromiumcontent.')
|
||||||
parser.add_argument('--defines', default='',
|
parser.add_argument('--defines', default='',
|
||||||
help='The build variables passed to gyp')
|
help='The build variables passed to gyp')
|
||||||
|
parser.add_argument('--cc_wrapper',
|
||||||
|
help='Sets cc_wrapper for build. E.g. $(which sccache)')
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,6 +122,8 @@ def args_to_defines(args):
|
||||||
if args.clang_dir:
|
if args.clang_dir:
|
||||||
defines += ' make_clang_dir=' + args.clang_dir
|
defines += ' make_clang_dir=' + args.clang_dir
|
||||||
defines += ' clang_use_chrome_plugins=0'
|
defines += ' clang_use_chrome_plugins=0'
|
||||||
|
if args.cc_wrapper is not None:
|
||||||
|
defines += ' cc_wrapper=' + args.cc_wrapper
|
||||||
return defines
|
return defines
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
# Set this to true when building with Clang.
|
# Set this to true when building with Clang.
|
||||||
'clang%': 1,
|
'clang%': 1,
|
||||||
|
|
||||||
|
# Set this to the absolute path to sccache when building with sccache
|
||||||
|
'cc_wrapper%': '',
|
||||||
|
|
||||||
# Path to mips64el toolchain.
|
# Path to mips64el toolchain.
|
||||||
'make_mips64_dir%': 'vendor/gcc-4.8.3-d197-n64-loongson/usr',
|
'make_mips64_dir%': 'vendor/gcc-4.8.3-d197-n64-loongson/usr',
|
||||||
|
|
||||||
|
@ -101,6 +104,15 @@
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
# Setup cc_wrapper
|
||||||
|
['cc_wrapper!=""', {
|
||||||
|
'make_global_settings': [
|
||||||
|
['CC_wrapper', '<(cc_wrapper)'],
|
||||||
|
['CXX_wrapper', '<(cc_wrapper)'],
|
||||||
|
['CC.host_wrapper', '<(cc_wrapper)'],
|
||||||
|
['CXX.host_wrapper', '<(cc_wrapper)']
|
||||||
|
],
|
||||||
|
}],
|
||||||
# Setup building with clang.
|
# Setup building with clang.
|
||||||
['clang==1', {
|
['clang==1', {
|
||||||
'make_global_settings': [
|
'make_global_settings': [
|
||||||
|
|
Loading…
Reference in a new issue