diff options
author | mithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 16:29:47 +0000 |
---|---|---|
committer | mithro@mithis.com <mithro@mithis.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 16:29:47 +0000 |
commit | 47813519b0c1f81f1e682a5431fe9925d2edb914 (patch) | |
tree | 81bed6807799e7a629ff05a531d35e91f57afae9 /build | |
parent | 57d4a88df5268ceaa222d1f5446a51b9cdd97110 (diff) | |
download | chromium_src-47813519b0c1f81f1e682a5431fe9925d2edb914.zip chromium_src-47813519b0c1f81f1e682a5431fe9925d2edb914.tar.gz chromium_src-47813519b0c1f81f1e682a5431fe9925d2edb914.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@261778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/build/common.gypi b/build/common.gypi index cff6f60..0b21454 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1352,7 +1352,33 @@ }, { '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 + ['clang!=1', { + '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. @@ -1369,15 +1395,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)', @@ -3187,7 +3210,7 @@ }], # http://gcc.gnu.org/wiki/DebugFission # Requires gold and gcc >= 4.8 or clang. - ['linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223', { + ['linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223 and use_goma==0', { 'cflags': ['-gsplit-dwarf'], 'ldflags': ['-Wl,--gdb-index'], }], @@ -3857,13 +3880,15 @@ ], }], ['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)', ], }], ], |