Descriptionsplit_link tool, config, and scripts for windows build
First pass at split linker. Splits inputs based on json spec, uses .def files
to export symbols in the other half, relinks to generate an import lib, and
finally links again for the real link, using the generated def file and import
lib. And then, repeats those steps until success (not all unresolved externals
are reported by the linker on the first pass). It's necessary to use the
linker to report externals rather than cracking lib/objs because when doing
LTCG, the object files are in an undocumented compiler-internal format and the
exports can't be gathered (and probably aren't fully determined yet).
Currently this approach only handles chrome.dll, not other large targets that
are monolithic exes (rather than mostly in a DLL with an EXE loader).
Integrated with build system by a linker shim. Original link.exe is saved, and
replaced by split_link binary. If "/splitlink" is found on the command line,
then run our script that does the iterations/exporting magic. Otherwise,
fallback to the original linker.
When GYP_DEFINES includes chrome_split_dll=1, the split linker is invoked.
chrome.exe has not yet been modified to know how to load split binaries, so
the build flag will not yet be directly useful for those not working on this
problem.
Release, non-LTCG, non-split:
05/09/2013 04:57 PM 57,447,936 chrome.dll
Release, non-LTCG, split:
05/10/2013 12:47 PM 39,567,872 chrome0.dll
05/10/2013 12:48 PM 19,274,240 chrome1.dll
Release, partial-LTCG (same as current settings), split:
05/10/2013 03:56 PM 25,934,336 chrome0.dll
05/10/2013 04:13 PM 16,347,648 chrome1.dll
It should be possible to get higher optimization levels for chrome1.dll (or
perhaps both parts), but that can happen in subsequent changes after more
testing.
TBR=cpu@chromium.org, maruel@chromium.org
BUG=237249
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=200049
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : links! #Patch Set 4 : . #Patch Set 5 : better linker shim, install check #Patch Set 6 : fix corrupted file from machine crash :( #Patch Set 7 : . #
Total comments: 8
Patch Set 8 : simplify entry point, comments #Patch Set 9 : dll version resource in all dlls #
Total comments: 1
Patch Set 10 : linebreak() #
Total comments: 16
Patch Set 11 : fixes #
Total comments: 27
Patch Set 12 : . #
Total comments: 24
Patch Set 13 : . #Patch Set 14 : . #Patch Set 15 : . #
Total comments: 8
Patch Set 16 : . #
Messages
Total messages: 16 (0 generated)
|