diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-23 08:20:16 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-23 08:20:16 +0000 |
commit | 707ad51b4293444091e48753ce9c7f5d845aa0db (patch) | |
tree | c9ce1df07a8a6f3b9bf2d5cc9e2d968b378f10e5 /build/common.gypi | |
parent | 17a659b887ff11329446256784dbafa42f140100 (diff) | |
download | chromium_src-707ad51b4293444091e48753ce9c7f5d845aa0db.zip chromium_src-707ad51b4293444091e48753ce9c7f5d845aa0db.tar.gz chromium_src-707ad51b4293444091e48753ce9c7f5d845aa0db.tar.bz2 |
Linux: Detect host g++ version as well as target g++ version.
BUG=360082
Review URL: https://codereview.chromium.org/247623003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r-- | build/common.gypi | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/build/common.gypi b/build/common.gypi index 436efec..52a91e3 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1359,7 +1359,7 @@ # 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%': '<!pymod_do_main(compiler_version assembler)', + 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)', }], # On Android we know the binutils version in the toolchain. ['OS=="android"', { @@ -1387,19 +1387,23 @@ ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', { 'conditions': [ ['OS=="android"', { - # We directly set the gcc_version since we know what we use. + # We directly set the gcc versions since we know what we use. 'conditions': [ ['target_arch=="x64" or target_arch=="arm64"', { + 'host_gcc_version%': 48, 'gcc_version%': 48, }, { + 'host_gcc_version%': 46, 'gcc_version%': 46, }], ], }, { - 'gcc_version%': '<!pymod_do_main(compiler_version)', + 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', + 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', }], ], }, { + 'host_gcc_version%': 0, 'gcc_version%': 0, }], ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', { @@ -3850,13 +3854,29 @@ # TODO(mithro): Watch for clang support at following thread: # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-support-to-clang-td4032180.html ['gcc_version>=48', { - 'cflags': [ - '-fuse-ld=gold', + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags': [ + '-fuse-ld=gold', + ], + 'ldflags': [ + '-fuse-ld=gold', + ], + }], ], - 'ldflags': [ - '-fuse-ld=gold', + }], + ['host_gcc_version>=48', { + 'target_conditions': [ + ['_toolset=="host"', { + 'cflags': [ + '-fuse-ld=gold', + ], + 'ldflags': [ + '-fuse-ld=gold', + ], + }], ], - }] + }], ], }], ['linux_use_bundled_binutils==1', { |