GN: do not set default GN args
It's just visual noise... this should make future gn_flavor.py changes show fewer incidental diffs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324573002 Review-Url: https://codereview.chromium.org/2324573002
This commit is contained in:
parent
57d6965562
commit
34ffb342f5
@ -27,7 +27,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
extra_config = self.m.vars.builder_cfg.get('extra_config', '')
|
||||
os = self.m.vars.builder_cfg.get('os', '')
|
||||
|
||||
cc, cxx = 'cc', 'c++'
|
||||
cc, cxx = None, None
|
||||
extra_cflags = []
|
||||
extra_ldflags = []
|
||||
|
||||
@ -45,14 +45,21 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
if extra_config.startswith('SK'):
|
||||
extra_cflags.append('-D' + extra_config)
|
||||
|
||||
quote = lambda x: '"%s"' % x
|
||||
gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted({
|
||||
'cc': quote(cc),
|
||||
'cxx': quote(cxx),
|
||||
'extra_cflags': quote(' '.join(extra_cflags)),
|
||||
'extra_ldflags': quote(' '.join(extra_ldflags)),
|
||||
'is_debug': 'true' if configuration == 'Debug' else 'false',
|
||||
}.iteritems()))
|
||||
args = {}
|
||||
|
||||
if configuration != 'Debug':
|
||||
args['is_debug'] = 'false'
|
||||
|
||||
for (k,v) in {
|
||||
'cc': cc,
|
||||
'cxx': cxx,
|
||||
'extra_cflags': ' '.join(extra_cflags),
|
||||
'extra_ldflags': ' '.join(extra_ldflags),
|
||||
}.iteritems():
|
||||
if v:
|
||||
args[k] = '"%s"' % v
|
||||
|
||||
gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems()))
|
||||
|
||||
self._run('fetch-gn', [self.m.vars.skia_dir.join('bin', 'fetch-gn')])
|
||||
self._run('gn gen', ['gn', 'gen', self.out_dir, '--args=' + gn_args])
|
||||
|
@ -89,7 +89,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Release-GN/Release",
|
||||
"--args=cc=\"clang\" cxx=\"clang++\" extra_cflags=\"\" extra_ldflags=\"\" is_debug=false"
|
||||
"--args=cc=\"clang\" cxx=\"clang++\" is_debug=false"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -89,7 +89,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-GN/Debug",
|
||||
"--args=cc=\"[SLAVE_BUILD]/clang_linux/bin/clang\" cxx=\"[SLAVE_BUILD]/clang_linux/bin/clang++\" extra_cflags=\"\" extra_ldflags=\"-fuse-ld=lld\" is_debug=true"
|
||||
"--args=cc=\"[SLAVE_BUILD]/clang_linux/bin/clang\" cxx=\"[SLAVE_BUILD]/clang_linux/bin/clang++\" extra_ldflags=\"-fuse-ld=lld\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -89,7 +89,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-GN/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=\"\" extra_ldflags=\"\" is_debug=true"
|
||||
"--args=cc=\"gcc\" cxx=\"g++\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -89,7 +89,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=\"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\" extra_ldflags=\"\" is_debug=true"
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=\"-DSK_USE_DISCARDABLE_SCALEDIMAGECACHE\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -89,7 +89,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Release-Fast/Release",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=\"-march=native -fomit-frame-pointer -O3\" extra_ldflags=\"\" is_debug=false"
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" extra_cflags=\"-march=native -fomit-frame-pointer -O3\" is_debug=false"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
|
@ -89,7 +89,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN\\Release",
|
||||
"--args=cc=\"cc\" cxx=\"c++\" extra_cflags=\"\" extra_ldflags=\"\" is_debug=false"
|
||||
"--args=is_debug=false"
|
||||
],
|
||||
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
|
||||
"env": {
|
||||
|
Loading…
Reference in New Issue
Block a user