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

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

Issue 709593004: Make *some* version of the Win GN build work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: turn off tcmalloc altogether 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
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index de3fac530757033122541ffe9dabbd66d81ce1b5..fb0c32cd8b3008dc6ec6e05c07f6c1d6a3d810ff 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -917,15 +917,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",

Powered by Google App Engine
This is Rietveld 408576698