Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Unified Diff: build/common.gypi

Issue 247623003: Linux: Detect host g++ version as well as target g++ version. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/compiler_version.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
===================================================================
--- build/common.gypi (revision 265327)
+++ build/common.gypi (working copy)
@@ -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"', {
@@ -3849,13 +3853,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', {
« no previous file with comments | « no previous file | build/compiler_version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698