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", |