summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 13:30:45 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 13:30:45 +0000
commit6dd8c7c53f1a75c09efec0300060a29bdfcf40b1 (patch)
tree499b15a08d78092ee76959caa372f185a0567ce7
parent8c2440c480f45bd5f31342e4ed26cad6193d47a7 (diff)
downloadchromium_src-6dd8c7c53f1a75c09efec0300060a29bdfcf40b1.zip
chromium_src-6dd8c7c53f1a75c09efec0300060a29bdfcf40b1.tar.gz
chromium_src-6dd8c7c53f1a75c09efec0300060a29bdfcf40b1.tar.bz2
Merge 262093 "Make it possible to disable fatal linker warnings"
> Make it possible to disable fatal linker warnings > > This came up in Gentoo Linux bug https://bugs.gentoo.org/show_bug.cgi?id=506268 > > Fatal linker warnings were originally introduced in https://codereview.chromium.org/196943020 > > BUG=352985 > R=jochen@chromium.org > > Review URL: https://codereview.chromium.org/224713007 TBR=phajdan.jr@chromium.org Review URL: https://codereview.chromium.org/228003008 git-svn-id: svn://svn.chromium.org/chrome/branches/1916/src@262389 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/common.gypi16
1 files changed, 13 insertions, 3 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 11bc933..5c9d589 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1237,6 +1237,10 @@
# whether warnings are treated as errors.
'chromium_code%': 0,
+ # Disable fatal linker warnings, similarly to how we make it possible
+ # to disable -Werror (e.g. for different toolchain versions).
+ 'disable_fatal_linker_warnings%': 0,
+
'release_valgrind_build%': 0,
# TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
@@ -3078,16 +3082,22 @@
},
},
'conditions': [
- # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
- ['os_posix==1 and (chromeos==0 or target_arch!="arm")', {
+ ['os_posix==1', {
'target_defaults': {
'ldflags': [
- '-Wl,--fatal-warnings',
'-Wl,-z,now',
'-Wl,-z,relro',
],
},
}],
+ # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
+ ['os_posix==1 and disable_fatal_linker_warnings==0 and (chromeos==0 or target_arch!="arm")', {
+ 'target_defaults': {
+ 'ldflags': [
+ '-Wl,--fatal-warnings',
+ ],
+ },
+ }],
['os_posix==1 and chromeos==0', {
# Chrome OS enables -fstack-protector-strong via its build wrapper,
# and we want to avoid overriding this, so stack-protector is only