diff options
author | mithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-09 20:20:45 +0000 |
---|---|---|
committer | mithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-09 20:20:45 +0000 |
commit | 9c23369f536c322bff69f24bdc853014b6f7beae (patch) | |
tree | d085b526e84839aa37a94f6980b125b343f0e5f2 /build/common.gypi | |
parent | 2842a8f952bed9f6473ca274affbd5e56d167ef7 (diff) | |
download | chromium_src-9c23369f536c322bff69f24bdc853014b6f7beae.zip chromium_src-9c23369f536c322bff69f24bdc853014b6f7beae.tar.gz chromium_src-9c23369f536c322bff69f24bdc853014b6f7beae.tar.bz2 |
When "linux_use_gold_binary" is set, we now use gold from third_party/binutils rather than third_party/gold (allowing us to remove third_party/gold dependency).
As third_party/binutils is 2.24, this also satisfies the binutils version requirements for Debug Fission. Thus, when building with clang on Ubuntu Precise it should now be enabled. This should cause a significant speedup in linking for most chrome developers on Linux.
Requires;
* https://codereview.chromium.org/209853003/ - Adding binutils as a DEPS to allow DebugFission on Ubuntu Precise when compiling with clang.
BUG=352046
Review URL: https://codereview.chromium.org/196573022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262794 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r-- | build/common.gypi | 59 |
1 files changed, 49 insertions, 10 deletions
diff --git a/build/common.gypi b/build/common.gypi index eb166b1..0b63d83 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1345,7 +1345,37 @@ }, { 'syzygy_optimize%': 0, }], - + # Get binutils version so we can enable debug fission if we can. + ['os_posix==1 and OS!="mac" and OS!="ios"', { + 'conditions': [ + # compiler_version doesn't work with clang + # TODO(mithro): Land https://codereview.chromium.org/199793014/ so + # compiler_version works with clang. + # TODO(glider): set clang to 1 earlier for ASan and TSan builds so + # that it takes effect here. + ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', { + 'binutils_version%': '<!(python <(DEPTH)/build/compiler_version.py assembler)', + }], + # On Android we know the binutils version in the toolchain. + ['OS=="android"', { + 'binutils_version%': 222, + }], + # Our version of binutils in third_party/binutils + ['linux_use_gold_binary==1', { + 'binutils_version%': 224, + 'conditions': [ + ['host_arch=="x64"', { + 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', + }], + ['host_arch=="ia32"', { + 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', + }], + ], + }], + ], + }, { + 'binutils_version%': 0, + }], # The version of GCC in use, set later in platforms that use GCC and have # not explicitly chosen to build with clang. Currently, this means all # platforms except Windows, Mac and iOS. @@ -1362,15 +1392,12 @@ 'gcc_version%': 46, }], ], - 'binutils_version%': 222, }, { 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', - 'binutils_version%': '<!(python <(DEPTH)/build/compiler_version.py assembler)', }], ], }, { 'gcc_version%': 0, - 'binutils_version%': 0, }], ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', { 'windows_sdk_path%': '<(windows_sdk_default_path)', @@ -3850,15 +3877,27 @@ ], }], ['linux_use_gold_binary==1', { + # Put our binutils, which contains gold in the search path. We pass + # the path to gold to the compiler. gyp leaves unspecified what the + # cwd is when running the compiler, so the normal gyp path-munging + # fails us. This hack gets the right path. + 'cflags': [ + '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', + ], 'ldflags': [ - # Put our gold binary in the search path for the linker. - # We pass the path to gold to the compiler. gyp leaves - # unspecified what the cwd is when running the compiler, - # so the normal gyp path-munging fails us. This hack - # gets the right path. - '-B<!(cd <(DEPTH) && pwd -P)/third_party/gold', + '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', ], }], + ['binutils_version>=224', { + # Newer binutils don't set DT_RPATH unless you disable "new" dtags + # and the new DT_RUNPATH doesn't work without --no-as-needed flag. + # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags + # inside this file to allow usage of --no-as-needed and removal of + # this flag. + 'ldflags': [ + '-Wl,--disable-new-dtags', + ], + }] ], }, }], |