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

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

Issue 2331373006: Enable incremental linking in release component builds (Closed)
Patch Set: Tweak logic and add bug link Created 4 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 | « build/config/compiler/BUILD.gn ('k') | third_party/WebKit/Source/core/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/win/BUILD.gn
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 48ac47e28a1bcc374fb14e4ed21592160749df26..b437516d6639ba7566e01db5ad14361f59fb2444 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -101,8 +101,11 @@ config("compiler") {
# Ensures that the PDB file contains FIXUP information (growing the PDB file
# by about 5%) but does not otherwise alter the output binary. This
# information is used by the Syzygy optimization tool when decomposing the
- # release image.
- if (!is_debug && !is_win_fastlink && !is_clang) {
+ # release image. It is enabled for syzyasan builds and opportunistically for
+ # other builds where it is not prohibited (not supported when incrementally
+ # linking, using /debug:fastlink, or building with clang).
+ if (is_syzyasan ||
+ (!is_debug && !is_component_build && !is_win_fastlink && !is_clang)) {
ldflags = [ "/PROFILE" ]
}
@@ -312,8 +315,9 @@ config("windowed") {
incremental_linking_on_switch = [ "/INCREMENTAL" ]
incremental_linking_off_switch = [ "/INCREMENTAL:NO" ]
-# Disable incremental linking for syzyasan
-if (is_debug && !is_syzyasan) {
+# Disable incremental linking for syzyasan, enable for debug builds and all
+# component builds - any builds where performance is not job one.
+if ((is_debug || is_component_build) && !is_syzyasan) {
default_incremental_linking_switch = incremental_linking_on_switch
} else {
default_incremental_linking_switch = incremental_linking_off_switch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | third_party/WebKit/Source/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698