Commit 6922bc1d authored by scottmg's avatar scottmg Committed by Commit bot

Enable incremental linking for static_library too

Timings on z620:

Without:

GYP_DEFINES=component=static_library chromium_win_pch=0 incremental_chrome_dll=0

touch content\app\main.cc (causes chrome.dll, chrome_child.dll, and unit_tests.exe to relink)
tim ninja -C out\Release unit_tests
[19/19] LINK_EMBED unit_tests.exe

real: 4m46.828s

With:

GYP_DEFINES=component=static_library branding=Chrome chromium_win_pch=0 incremental_chrome_dll=1

touch content\app\content_main.cc && tim ninja -C out\Release unit_tests
ninja: Entering directory `out\Release'
[19/19] LINK_EMBED unit_tests.exe

real: 0m43.625s

This is basically best case, and the actual performance on bots will differ based on
their config and the number of files that change from run-to-run, but it seems worth
enabling to see what happens, at least.

R=jam@chromium.org
BUG=404809,402270

Review URL: https://codereview.chromium.org/502993005

Cr-Commit-Position: refs/heads/master@{#295786}
parent 74b148a0
...@@ -1931,11 +1931,11 @@ ...@@ -1931,11 +1931,11 @@
['asan==1', { ['asan==1', {
'win_use_allocator_shim%': 0, 'win_use_allocator_shim%': 0,
}], }],
['component=="shared_library" and "<(GENERATOR)"=="ninja"', { ['buildtype!="Official"', {
# Only enabled by default for ninja because it's buggy in VS. # Not enabled in Official because it adds padding to builds.
# Not enabled for component=static_library because some targets # Enabled for both shared_library and static_library on an
# are too large and the toolchain fails due to the size of the # experimental basis to see if it improves windows cycle times,
# .obj files. # see http://crbug.com/404809.
'incremental_chrome_dll%': 1, 'incremental_chrome_dll%': 1,
}], }],
# Don't do incremental linking for large modules on 32-bit or when # Don't do incremental linking for large modules on 32-bit or when
...@@ -3371,6 +3371,17 @@ ...@@ -3371,6 +3371,17 @@
# information is used by the Syzygy optimization tool when # information is used by the Syzygy optimization tool when
# decomposing the release image. # decomposing the release image.
'Profile': 'true', 'Profile': 'true',
'conditions': [
['incremental_chrome_dll', {
# During bring-up of Release incremental, have the linker emit
# a one line diagnostic describing why incremental linking
# failed, when it does. http://crbug.com/404809.
'AdditionalOptions': [
'/verbose:incr',
],
}],
],
}, },
}, },
'conditions': [ 'conditions': [
......
...@@ -356,6 +356,13 @@ ...@@ -356,6 +356,13 @@
'<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf', '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
], ],
'conditions': [ 'conditions': [
['incremental_chrome_dll==1', {
'msvs_settings': {
'VCLinkerTool': {
'UseLibraryDependencyInputs': 'true',
},
},
}],
['chrome_pgo_phase==1', { ['chrome_pgo_phase==1', {
'msvs_settings': { 'msvs_settings': {
'VCLinkerTool': { 'VCLinkerTool': {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment