summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_dll.gypi
diff options
context:
space:
mode:
authorsebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-14 16:48:30 +0000
committersebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-14 16:48:30 +0000
commit72589062a301d984e9aef85c6411ac116ca9bbf5 (patch)
treeb07021bf40dda928da9a99a39370d2877088354b /chrome/chrome_dll.gypi
parent64fd158300f88d06c8ac52c8a67f08955333ecd2 (diff)
downloadchromium_src-72589062a301d984e9aef85c6411ac116ca9bbf5.zip
chromium_src-72589062a301d984e9aef85c6411ac116ca9bbf5.tar.gz
chromium_src-72589062a301d984e9aef85c6411ac116ca9bbf5.tar.bz2
Add PGO targets to Chrome.
This allows to do a PGO optimized build of Chrome with the following commands: python build\gyp_chromium -Dchrome_pgo_phase=1 ninja -C out\Release chrome run with '--no-sandbox' + pgosweep python build\gyp_chromium -Dchrome_pgo_phase=2 ninja -C out\Release chrome ----- Approach that didn't worked ----- (see comment #13 to know why this didn't work) Instead of having the following gyp dependency chain (for a regular build), here '->' means 'depends on': 'chrome'->|'chrome_main_dll' ----------|'chrome_child_dll' we know have the following one (when chrome_pgo==1): 'chrome'->|'chrome_main_dll' |->'chrome_pgo_optimize'->|'chrome_main_dll_pgi' ----------|'chrome_child_dll'|-------------------------|'chrome_child_dll_pgi' The '*_pgi' target correspond to the instrumented dll, the name of the DLLs produced by target will be terminated by '_pgi'. During the 'chrome_pgo_optimize' step the instrumented DLLs will be renamed (the '_pgi' suffix will be removed) and Chrome will be run against a set of profile test cases, pgosweep.exe will also be invoked to collect the instrumentation data. Then the main targets ('chrome_main_dll' and 'chrome_child_dll') will be linked with the flag /LTCG:PGOPTIMIZE, this will produce the optimized DLLs. -------------------------------------------- R=scottmg@chromium.org BUG= Review URL: https://codereview.chromium.org/187813008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_dll.gypi')
-rw-r--r--chrome/chrome_dll.gypi30
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index 13756e1..63887c6 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -220,6 +220,20 @@
'chrome_dll_pdb_workaround',
],
}],
+ ['chrome_pgo_phase==1', {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'LinkTimeCodeGeneration': '2',
+ },
+ },
+ }],
+ ['chrome_pgo_phase==2', {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'LinkTimeCodeGeneration': '3',
+ },
+ },
+ }],
]
}],
['chrome_multiple_dll==1', {
@@ -368,6 +382,22 @@
'dependencies': [
'<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
],
+ 'conditions': [
+ ['chrome_pgo_phase==1', {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'LinkTimeCodeGeneration': '2',
+ },
+ },
+ }],
+ ['chrome_pgo_phase==2', {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'LinkTimeCodeGeneration': '3',
+ },
+ },
+ }],
+ ]
}],
],
}, # target chrome_child_dll