OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 # Intended to be included by chrome_syzygy.gyp. A variable 'dll_name' should | 5 # Intended to be included by chrome_syzygy.gyp. A variable 'dll_name' should |
6 # be set to the base name of the DLL. This is used to generate the build steps | 6 # be set to the base name of the DLL. This is used to generate the build steps |
7 # for both chrome.dll and chrome_child.dll when in multiple dll mode. | 7 # for both chrome.dll and chrome_child.dll when in multiple dll mode. |
8 { | 8 { |
9 # Reorder or instrument the initial chrome DLL executable, placing the | 9 # Reorder or instrument the initial chrome DLL executable, placing the |
10 # optimized output and corresponding PDB file into the "syzygy" | 10 # optimized output and corresponding PDB file into the "syzygy" |
11 # subdirectory. | 11 # subdirectory. |
12 # This target won't build in fastbuild, since there are no PDBs. | 12 # This target won't build in fastbuild, since there are no PDBs. |
13 'dependencies': [ | 13 'dependencies': [ |
14 '<(DEPTH)/chrome/chrome.gyp:<(dll_name)_dll', | 14 '<(DEPTH)/chrome/chrome.gyp:<(dll_name)_dll', |
15 ], | 15 ], |
16 'conditions': [ | 16 'conditions': [ |
17 ['syzyasan==0 and syzygy_optimize==1', { | 17 ['syzyasan==0 and syzygy_optimize==1', { |
18 # Reorder chrome DLL executable. | 18 # Reorder chrome DLL executable. |
19 # If there's a matching chrome.dll-ordering.json file present in | 19 # If there's a matching chrome.dll-ordering.json file present in |
20 # the output directory, chrome.dll will be ordered according to | 20 # the output directory, chrome.dll will be ordered according to |
21 # that, otherwise it will be randomized. | 21 # that, otherwise it will be randomized. |
22 'actions': [ | 22 'actions': [ |
23 { | 23 { |
24 'action_name': 'Reorder Chrome with Syzygy', | 24 'action_name': 'Reorder Chrome with Syzygy', |
25 'inputs': [ | 25 'inputs': [ |
26 '<(DEPTH)/chrome/tools/build/win/syzygy/reorder.py', | 26 '<(DEPTH)/build/win/syzygy/reorder.py', |
27 '<(PRODUCT_DIR)/<(dll_name).dll', | 27 '<(PRODUCT_DIR)/<(dll_name).dll', |
28 '<(PRODUCT_DIR)/<(dll_name).dll.pdb', | 28 '<(PRODUCT_DIR)/<(dll_name).dll.pdb', |
29 ], | 29 ], |
30 'outputs': [ | 30 'outputs': [ |
31 '<(dest_dir)/<(dll_name).dll', | 31 '<(dest_dir)/<(dll_name).dll', |
32 '<(dest_dir)/<(dll_name).dll.pdb', | 32 '<(dest_dir)/<(dll_name).dll.pdb', |
33 ], | 33 ], |
34 'action': [ | 34 'action': [ |
35 'python', | 35 'python', |
36 '<(DEPTH)/chrome/tools/build/win/syzygy/reorder.py', | 36 '<(DEPTH)/build/win/syzygy/reorder.py', |
37 '--input_executable', '<(PRODUCT_DIR)/<(dll_name).dll', | 37 '--input_executable', '<(PRODUCT_DIR)/<(dll_name).dll', |
38 '--input_symbol', '<(PRODUCT_DIR)/<(dll_name).dll.pdb', | 38 '--input_symbol', '<(PRODUCT_DIR)/<(dll_name).dll.pdb', |
39 '--destination_dir', '<(dest_dir)', | 39 '--destination_dir', '<(dest_dir)', |
40 ], | 40 ], |
41 }, | 41 }, |
42 ], | 42 ], |
43 }], | 43 }], |
44 ['syzyasan==1 and syzygy_optimize==0', { | 44 ['syzyasan==1 and syzygy_optimize==0', { |
45 # Instrument chrome DLL executable with SyzyAsan. | 45 # Instrument chrome DLL executable with SyzyAsan. |
46 'actions': [ | 46 'actions': [ |
47 { | 47 { |
48 'action_name': 'Instrument Chrome with SyzyAsan', | 48 'action_name': 'Instrument Chrome with SyzyAsan', |
49 'inputs': [ | 49 'inputs': [ |
50 '<(DEPTH)/chrome/tools/build/win/syzygy/instrument.py', | 50 '<(DEPTH)/build/win/syzygy/instrument.py', |
51 '<(DEPTH)/chrome/tools/build/win/syzygy/' | 51 '<(DEPTH)/build/win/syzygy/' |
52 'syzyasan-instrumentation-filter.txt', | 52 'syzyasan-instrumentation-filter.txt', |
53 '<(PRODUCT_DIR)/<(dll_name).dll', | 53 '<(PRODUCT_DIR)/<(dll_name).dll', |
54 ], | 54 ], |
55 'outputs': [ | 55 'outputs': [ |
56 '<(dest_dir)/<(dll_name).dll', | 56 '<(dest_dir)/<(dll_name).dll', |
57 '<(dest_dir)/<(dll_name).dll.pdb', | 57 '<(dest_dir)/<(dll_name).dll.pdb', |
58 '<(dest_dir)/win-syzyasan-filter-<(dll_name).txt.json', | 58 '<(dest_dir)/win-syzyasan-filter-<(dll_name).txt.json', |
59 ], | 59 ], |
60 'action': [ | 60 'action': [ |
61 'python', | 61 'python', |
62 '<(DEPTH)/chrome/tools/build/win/syzygy/instrument.py', | 62 '<(DEPTH)/build/win/syzygy/instrument.py', |
63 '--mode', 'asan', | 63 '--mode', 'asan', |
64 '--input_executable', '<(PRODUCT_DIR)/<(dll_name).dll', | 64 '--input_executable', '<(PRODUCT_DIR)/<(dll_name).dll', |
65 '--input_symbol', '<(PRODUCT_DIR)/<(dll_name).dll.pdb', | 65 '--input_symbol', '<(PRODUCT_DIR)/<(dll_name).dll.pdb', |
66 '--filter', | 66 '--filter', |
67 '<(DEPTH)/chrome/tools/build/win/syzygy/' | 67 '<(DEPTH)/build/win/syzygy/syzyasan-instrumentation-filter.txt', |
68 'syzyasan-instrumentation-filter.txt', | |
69 '--output-filter-file', | 68 '--output-filter-file', |
70 '<(dest_dir)/win-syzyasan-filter-<(dll_name).txt.json', | 69 '<(dest_dir)/win-syzyasan-filter-<(dll_name).txt.json', |
71 '--destination_dir', '<(dest_dir)', | 70 '--destination_dir', '<(dest_dir)', |
72 ], | 71 ], |
73 }, | 72 }, |
74 ], | 73 ], |
75 'dependencies': [ | 74 'dependencies': [ |
76 'copy_syzyasan_binaries', | 75 'copy_syzyasan_binaries', |
77 ], | 76 ], |
78 }], | 77 }], |
79 ], | 78 ], |
80 } | 79 } |
OLD | NEW |