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 |