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

Unified Diff: build/config/compiler/BUILD.gn

Issue 899403003: Linux: Enable ODR violation detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reference libphonenumber bug Created 5 years, 10 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 | « build/common.gypi ('k') | third_party/libphonenumber/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9739093b64a7a1cbe4e287783288c24e3db8af00..1d996dfd8593cb4e7c4a9fb1bd6a332573633f4f 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -71,7 +71,7 @@ if (!is_win) {
#
# Base compiler configuration.
#
-# See also "runtime_library" below for related stuff and a discusison about
+# See also "runtime_library" below for related stuff and a discussion about
# where stuff should go. Put warning related stuff in the "warnings" config.
config("compiler") {
@@ -382,6 +382,7 @@ config("compiler") {
# linker might not be gold, but isn't used much anyway.
"-Wl,--threads",
"-Wl,--thread-count=4",
+ "-Wl,--detect-odr-violations",
]
}
@@ -475,6 +476,15 @@ config("compiler_arm_fpu") {
}
}
+# //third_party/libphonenumber is the only existing code that needs this.
+# http://crbug.com/456021
+# New code should fix their ODR violations instead of ignoring them.
+config("compiler_allow_odr_violations") {
+ if (use_gold) {
+ ldflags = [ "-Wl,--no-detect-odr-violations" ]
+ }
+}
Nico 2015/02/06 15:46:04 You can have a local config in the libphonenumber
Lei Zhang 2015/02/06 23:44:55 Oh, I tried that, but I needed to duplicate the |u
+
# runtime_library -------------------------------------------------------------
#
# Sets the runtime library and associated options.
« no previous file with comments | « build/common.gypi ('k') | third_party/libphonenumber/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698