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

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

Issue 1329833002: Improve mini installer and official build GN flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | chrome/installer/mini_installer/BUILD.gn » ('j') | chrome/installer/mini_installer/BUILD.gn » ('J')
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 d1703e23125ac9c2d6d6622e42e13b2f8d697ef3..c9dc0cd0850edc5208795a643b54a3f9305d6f82 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1168,6 +1168,8 @@ if (is_win) {
common_optimize_on_cflags = [
"/Ob2", # Both explicit and auto inlining.
"/Oy-", # Disable omitting frame pointers, must be after /O2.
+ "/d2Zi+", # Improve debugging of optimized code.
+ "/Zc:inline", # Remove unreferenced COMDAT (faster links).
]
if (!is_asan) {
common_optimize_on_cflags += [
@@ -1179,7 +1181,17 @@ if (is_win) {
"/Gw",
]
}
- common_optimize_on_ldflags = [ "/OPT:REF" ]
+ common_optimize_on_ldflags = [ "/OPT:ICF" ]
+ if (is_official_build) {
+ common_optimize_on_ldflags += [
+ # Link-time code generation.
+ "/LTCG",
+
+ # Set the number of LTCG code-gen threads to eight. The default is four.
+ # This gives a 5-10% link speedup.
+ "/cgthreads:8",
+ ]
+ }
} else {
common_optimize_on_cflags = [
# Don't emit the GCC version ident directives, they just end up in the
@@ -1292,7 +1304,6 @@ config("optimize_max") {
# value of C4702 for PGO builds is likely very small.
"/wd4702",
]
- ldflags += [ "/LTCG" ]
}
} else {
cflags = [ "-O2" ] + common_optimize_on_cflags
« no previous file with comments | « no previous file | chrome/installer/mini_installer/BUILD.gn » ('j') | chrome/installer/mini_installer/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698