OLD | NEW |
---|---|
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 { | 4 { |
5 'conditions': [ | 5 'conditions': [ |
6 ['OS=="win" and fastbuild==0', { | 6 ['OS=="win" and fastbuild==0', { |
7 # Reorder the initial chrome DLL executable, placing the optimized | 7 # Reorder or instrument the initial chrome DLL executable, placing the |
8 # output and corresponding PDB file into the "syzygy" subdirectory. | 8 # optimized output and corresponding PDB file into the "syzygy" |
9 # If there's a matching chrome.dll-ordering.json file present in | 9 # subdirectory. |
10 # the output directory, chrome.dll will be ordered according to that, | |
11 # otherwise it will be randomized. | |
12 # This target won't build in fastbuild, since there are no PDBs. | 10 # This target won't build in fastbuild, since there are no PDBs. |
13 'targets': [ | 11 'targets': [ |
14 { | 12 { |
15 'target_name': 'chrome_dll_syzygy', | 13 'target_name': 'chrome_dll_syzygy', |
16 'type': 'none', | 14 'type': 'none', |
17 'sources' : [], | 15 'sources' : [], |
18 'dependencies': [ | 16 'dependencies': [ |
19 '<(DEPTH)/chrome/chrome.gyp:chrome_dll', | 17 '<(DEPTH)/chrome/chrome.gyp:chrome_dll', |
20 ], | 18 ], |
21 'variables': { | 19 'variables': { |
22 'dest_dir': '<(PRODUCT_DIR)\\syzygy', | 20 'dest_dir': '<(PRODUCT_DIR)\\syzygy', |
23 }, | 21 }, |
24 'actions': [ | 22 'conditions': [ |
25 { | 23 ['asan!=1', { |
26 'action_name': 'Reorder Chrome with Syzygy', | 24 # Reorder chrome DLL executable. |
27 'msvs_cygwin_shell': 0, | 25 # If there's a matching chrome.dll-ordering.json file present in |
28 'inputs': [ | 26 # the output directory, chrome.dll will be ordered according to |
29 '<(PRODUCT_DIR)\\chrome.dll', | 27 # that, otherwise it will be randomized. |
30 '<(PRODUCT_DIR)\\chrome.dll.pdb', | 28 'actions': [ |
29 { | |
30 'action_name': 'Reorder Chrome with Syzygy', | |
31 'msvs_cygwin_shell': 0, | |
32 'inputs': [ | |
33 '<(PRODUCT_DIR)\\chrome.dll', | |
34 '<(PRODUCT_DIR)\\chrome.dll.pdb', | |
35 ], | |
36 'outputs': [ | |
37 '<(dest_dir)\\chrome.dll', | |
38 '<(dest_dir)\\chrome.dll.pdb', | |
39 ], | |
40 'action': [ | |
41 'python', | |
42 '<(DEPTH)/chrome/tools/build/win/syzygy_reorder.py', | |
43 '--input_executable', '<(PRODUCT_DIR)\\chrome.dll', | |
44 '--input_symbol', '<(PRODUCT_DIR)\\chrome.dll.pdb', | |
45 '--destination_dir', '<(dest_dir)', | |
46 ], | |
47 }, | |
31 ], | 48 ], |
32 'outputs': [ | 49 }], |
33 '<(dest_dir)\\chrome.dll', | 50 ['asan==1', { |
34 '<(dest_dir)\\chrome.dll.pdb', | 51 # Instrument chrome DLL executable with SyzyAsan. |
52 'actions': [ | |
53 { | |
54 'action_name': 'Instrument Chrome with SyzyAsan', | |
55 'msvs_cygwin_shell': 0, | |
56 'inputs': [ | |
57 '<(PRODUCT_DIR)\\chrome.dll', | |
58 '<(PRODUCT_DIR)\\chrome.dll.pdb', | |
59 ], | |
60 'outputs': [ | |
61 '<(dest_dir)\\chrome.dll', | |
62 '<(dest_dir)\\chrome.dll.pdb', | |
63 ], | |
64 'action': [ | |
65 'python', | |
66 '<(DEPTH)/chrome/tools/build/win/syzygy_instrument.py', | |
Roger McFarlane (Chromium)
2013/02/01 18:54:30
stray thought:
In principle you could go straight
Sébastien Marchand
2013/02/01 19:54:31
Yeah, the python script allows us to do more stuff
| |
67 '--mode', 'asan', | |
68 '--agent_dll', '<(DEPTH)\\third_party\\syzygy\\binaries' | |
69 '\\exe\\asan_rtl.dll', | |
70 '--input_executable', '<(PRODUCT_DIR)\\chrome.dll', | |
71 '--input_symbol', '<(PRODUCT_DIR)\\chrome.dll.pdb', | |
72 '--destination_dir', '<(dest_dir)', | |
73 ], | |
74 }, | |
35 ], | 75 ], |
36 'action': [ | 76 }], |
37 'python', | |
38 '<(DEPTH)/chrome/tools/build/win/syzygy_reorder.py', | |
39 '--input_executable', '<(PRODUCT_DIR)\\chrome.dll', | |
40 '--input_symbol', '<(PRODUCT_DIR)\\chrome.dll.pdb', | |
41 '--destination_dir', '<(dest_dir)', | |
42 ], | |
43 }, | |
44 ], | 77 ], |
45 }, | 78 }, |
46 ], | 79 ], |
47 }], | 80 }], |
48 ], | 81 ], |
49 } | 82 } |
OLD | NEW |