Disable gold linker by default
The bundled gold (third_party/gold) does not work on Ubuntu 64bit server. Did some benchmarking on some systems: the build is around 1% faster, which is not significant. "gold" tool will still be pulled in using gclient. It can be enabled via GYP_DEFINES flag: GYP_DEFINES="linux_use_gold_binary=1 linux_use_gold_flags=1" gclient runhooks Issue: 7 Change-Id: Ic5a83368e0e475280f6722ddbd3f5cead2276712
This commit is contained in:
parent
daac38db98
commit
35e033b838
|
@ -58,14 +58,15 @@ if __name__ == '__main__':
|
||||||
args.extend(['-I' + os.path.join(src_dir, 'build', 'common.gypi')])
|
args.extend(['-I' + os.path.join(src_dir, 'build', 'common.gypi')])
|
||||||
|
|
||||||
# Set these default GYP_DEFINES if user does not set the value explicitly.
|
# Set these default GYP_DEFINES if user does not set the value explicitly.
|
||||||
_DEFAULT_DEFINES = {"test_isolation_mode" : "noop", "use_glib" : 0,
|
_DEFAULT_DEFINES = {'test_isolation_mode': 'noop', 'use_glib': 0,
|
||||||
"use_openssl" : 1, "use_x11" : 0}
|
'use_openssl': 1, 'use_x11': 0,
|
||||||
|
'linux_use_gold_binary': 0, 'linux_use_gold_flags': 0}
|
||||||
|
|
||||||
gyp_defines = (os.environ['GYP_DEFINES'] if os.environ.get('GYP_DEFINES')
|
gyp_defines = (os.environ['GYP_DEFINES'] if os.environ.get('GYP_DEFINES')
|
||||||
else "")
|
else '')
|
||||||
for key in _DEFAULT_DEFINES:
|
for key in _DEFAULT_DEFINES:
|
||||||
if key not in gyp_defines:
|
if key not in gyp_defines:
|
||||||
gyp_defines += " {0}={1}".format(key, _DEFAULT_DEFINES[key])
|
gyp_defines += ' {0}={1}'.format(key, _DEFAULT_DEFINES[key])
|
||||||
os.environ['GYP_DEFINES'] = gyp_defines.strip()
|
os.environ['GYP_DEFINES'] = gyp_defines.strip()
|
||||||
|
|
||||||
# There shouldn't be a circular dependency relationship between .gyp files,
|
# There shouldn't be a circular dependency relationship between .gyp files,
|
||||||
|
@ -88,7 +89,7 @@ if __name__ == '__main__':
|
||||||
output_dir = os.path.join(checkout_dir, 'out')
|
output_dir = os.path.join(checkout_dir, 'out')
|
||||||
gyp_generator_flags = 'output_dir="' + output_dir + '"'
|
gyp_generator_flags = 'output_dir="' + output_dir + '"'
|
||||||
if os.environ.get('GYP_GENERATOR_FLAGS'):
|
if os.environ.get('GYP_GENERATOR_FLAGS'):
|
||||||
os.environ['GYP_GENERATOR_FLAGS'] += " " + gyp_generator_flags
|
os.environ['GYP_GENERATOR_FLAGS'] += ' ' + gyp_generator_flags
|
||||||
else:
|
else:
|
||||||
os.environ['GYP_GENERATOR_FLAGS'] = gyp_generator_flags
|
os.environ['GYP_GENERATOR_FLAGS'] = gyp_generator_flags
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue