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. |