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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sccache option to bootstrap #12582
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,9 @@ 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('--sccache', | ||
help='Enables sccache support, provide the path to ' + | ||
'sccache. E.g. $(which sccache)') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PEP8 complains about the indentation here. help='Enables sccache support, provide the path to ' +
'sccache. E.g. $(which sccache)') I would also ask to to remove double spaces around |
||
return parser.parse_args() | ||
|
||
|
||
|
@@ -120,6 +123,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.sccache is not None: | ||
defines += ' sccache_path=' + args.sccache | ||
return defines | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
'sccache_path%': '', | ||
|
||
# Path to mips64el toolchain. | ||
'make_mips64_dir%': 'vendor/gcc-4.8.3-d197-n64-loongson/usr', | ||
|
||
|
@@ -101,6 +104,12 @@ | |
], | ||
}, | ||
'conditions': [ | ||
# Setup sccache | ||
['sccache_path!=""', { | ||
'make_global_settings': [ | ||
['CC_wrapper', '<(sccache_path)'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should also set |
||
], | ||
}], | ||
# Setup building with clang. | ||
['clang==1', { | ||
'make_global_settings': [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename it to
cc_wrapper
.Because technically it can be any binary, not only
sccache
. And it would also match GN's arg name.