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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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/config/android/rules.gni ('k') | build/ios/coverage.gypi » ('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 cc2b7f55922bdd465896eeae06da6ff773e17423..164b97d26260f3e238834c36ffad1e9e53037f5c 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -350,10 +350,7 @@ config("compiler") {
"-Wl,-z,now",
"-Wl,-z,relro",
]
-
- # TODO(zork): The mipsel build is broken in ffmpeg, guard this flag for now
- # to hide the breakage. https://crbug.com/450771
- if (!using_sanitizer && cpu_arch != "mipsel") {
+ if (!using_sanitizer) {
ldflags += [ "-Wl,-z,defs" ]
}
}
@@ -903,7 +900,17 @@ if (is_win) {
"/Oy-", # disable omitting frame pointers, must be after /o2.
"/Os", # favor size over speed.
]
- common_optimize_on_ldflags = []
+ if (!is_asan) {
+ common_optimize_on_cflags += [
+ # Put data in separate COMDATs. This allows the linker
+ # to put bit-identical constants at the same address even if
+ # they're unrelated constants, which saves binary size.
+ # This optimization can't be used when ASan is enabled because
+ # it is not compatible with the ASan ODR checker.
+ "/Gw",
+ ]
+ }
+ common_optimize_on_ldflags = [ "/OPT:REF" ]
} else {
common_optimize_on_cflags = [
# Don't emit the GCC version ident directives, they just end up in the
@@ -938,9 +945,15 @@ if (is_win) {
# Specifically tell the linker to perform optimizations.
# See http://lwn.net/Articles/192624/ .
"-Wl,-O1",
- "-Wl,--as-needed",
"-Wl,--gc-sections",
]
+
+ if (!using_sanitizer) {
+ # Functions interposed by the sanitizers can make ld think
+ # that some libraries aren't needed when they actually are,
+ # http://crbug.com/234010. As workaround, disable --as-needed.
+ common_optimize_on_ldflags += [ "-Wl,--as-needed" ]
+ }
}
}
« no previous file with comments | « build/config/android/rules.gni ('k') | build/ios/coverage.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698