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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/config/features.gni » ('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 3d1b341ce19a6233970f9530f3d50bea6ea03644..1c51cd0e1a020e2b5178dba5f5784231e3fff889 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -745,9 +745,6 @@ config("default_warnings") {
# TODO(thakis): Remove, http://crbug.com/263960
"-Wno-reserved-user-defined-literal",
-
- # TODO(hans): Clean this up. Or disable with finer granularity.
- "-Wno-unused-local-typedef",
]
}
if (gcc_version >= 48) {
@@ -918,15 +915,28 @@ config("optimize_max") {
cflags = common_optimize_on_cflags
ldflags = common_optimize_on_ldflags
if (is_win) {
+ cflags -= [
+ "/Os",
+ ]
cflags += [
"/Ot", # Favor speed over size.
- "/GL", # Whole program optimization.
- # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
- # Probably anything that this would catch that wouldn't be caught in a
- # normal build isn't going to actually be a bug, so the incremental value
- # of C4702 for PGO builds is likely very small.
- "/wd4702",
]
+ if (is_official_build) {
+ # TODO(GYP): TODO(dpranke): Should these only be on in an official
+ # build, or on all the time? For now we'll require official build so
+ # that the compile is clean.
+ cflags += [
+ "/GL", # Whole program optimization.
+ # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
+ # Probably anything that this would catch that wouldn't be caught in a
+ # normal build isn't going to actually be a bug, so the incremental
+ # value of C4702 for PGO builds is likely very small.
+ "/wd4702",
+ ]
+ ldflags += [
+ "/LTCG",
+ ]
+ }
} else {
cflags += [
"-O2",
« no previous file with comments | « build/config/android/rules.gni ('k') | build/config/features.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698