Chromium Code Reviews
DescriptionReduce chrome.exe .text size by 50 KB with static_library
Also improves build times.
chrome.exe's .text (code) section in gn builds is about 55 KB larger
than in gyp builds (32-bit official). This is largely or completely
because of the use of source sets. The gn build links with about 320
.obj files whereas the gyp build links with ten. The linker pulls in
all of those .obj files and then fails to do a perfect job of discarding
the unused code and data.
This change gets rid of ~50 KB of this discrepancy by changing several
build targets from source_set to static_library and reducing the number
of .obj files to be linked to 72.
The size gain came from the change to components/variations, but the
other changes help to ensure that the size gain sticks, and help with
build speeds.
This change reduces the build times for relinking the affected
binaries (mostly chrome.dll and chrome_child.dll) in an official build
about 4-7%.
Some source_set targets could not be changed. These were annotated as
such to avoid wasting time on them in the future.
BUG=624274
Committed: https://crrev.com/fe9b427bc2c5c840906daef07c6dd6789cfc6447
Cr-Commit-Position: refs/heads/master@{#405671}
Patch Set 1 #Patch Set 2 : Another five or so changes #Patch Set 3 : Remove static_library for gfx:selection_bound_sources #Patch Set 4 : gfx:memory_buffer_sources can't be a source_set due to exports #Patch Set 5 : Remove static_library from libpng #Patch Set 6 : Tweaking comments #
Total comments: 2
Messages
Total messages: 16 (8 generated)
|