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

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

Issue 2474963002: Add a flag to turn on incremental LTCG. (Closed)
Patch Set: s/LTCG/WPO. Created 4 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 | « no previous file | build/config/compiler/compiler.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 c7e10b21ddaa8dd3b839f329f5d27486ec8cfeb6..4197228e9cc0245df2f030c1f106504140455001 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1246,15 +1246,23 @@ if (is_win) {
common_optimize_on_ldflags += [ "/OPT:REF" ] # Remove unreferenced data.
if (!use_lld) {
common_optimize_on_ldflags += [
- "/LTCG", # Link-time code generation.
-
# Set the number of LTCG code-gen threads to eight. The default is four.
# This gives a 5-10% link speedup.
"/cgthreads:8",
]
+ if (use_incremental_wpo) {
+ # Incremental Link-time code generation.
+ common_optimize_on_ldflags += [ "/LTCG:INCREMENTAL" ]
+ } else {
+ common_optimize_on_ldflags += [ "/LTCG" ] # Link-time code generation.
+ }
}
if (full_wpo_on_official) {
- arflags = [ "/LTCG" ]
+ if (use_incremental_wpo) {
+ arflags = [ "/LTCG:INCREMENTAL" ]
+ } else {
+ arflags = [ "/LTCG" ]
+ }
}
}
} else {
« no previous file with comments | « no previous file | build/config/compiler/compiler.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698