Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sccache option to bootstrap #12582

Merged
merged 4 commits into from
Apr 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions script/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def parse_args():
help='The static library path of libchromiumcontent.')
parser.add_argument('--defines', default='',
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()


Expand All @@ -120,6 +122,8 @@ def args_to_defines(args):
if args.clang_dir:
defines += ' make_clang_dir=' + args.clang_dir
defines += ' clang_use_chrome_plugins=0'
if args.cc_wrapper is not None:
defines += ' cc_wrapper=' + args.cc_wrapper
return defines


Expand Down
12 changes: 12 additions & 0 deletions toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# Set this to true when building with Clang.
'clang%': 1,

# Set this to the absolute path to sccache when building with sccache
'cc_wrapper%': '',

# Path to mips64el toolchain.
'make_mips64_dir%': 'vendor/gcc-4.8.3-d197-n64-loongson/usr',

Expand Down Expand Up @@ -101,6 +104,15 @@
],
},
'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.
['clang==1', {
'make_global_settings': [
Expand Down