| 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 # Instrument chrome DLL executable with SyzyAsan. |
| 34 '<(dest_dir)\\chrome.dll.pdb', | 51 'actions': [ |
| 52 { |
| 53 'action_name': 'Instrument Chrome with SyzyAsan', |
| 54 'msvs_cygwin_shell': 0, |
| 55 'inputs': [ |
| 56 '<(PRODUCT_DIR)\\chrome.dll', |
| 57 '<(PRODUCT_DIR)\\chrome.dll.pdb', |
| 58 ], |
| 59 'outputs': [ |
| 60 '<(dest_dir)\\chrome.dll', |
| 61 '<(dest_dir)\\chrome.dll.pdb', |
| 62 ], |
| 63 'action': [ |
| 64 'python', |
| 65 '<(DEPTH)/chrome/tools/build/win/syzygy_instrument.py', |
| 66 '--mode', 'asan', |
| 67 '--agent_dll', '<(DEPTH)\\third_party\\syzygy\\binaries' |
| 68 '\\exe\\asan_rtl.dll', |
| 69 '--input_executable', '<(PRODUCT_DIR)\\chrome.dll', |
| 70 '--input_symbol', '<(PRODUCT_DIR)\\chrome.dll.pdb', |
| 71 '--destination_dir', '<(dest_dir)', |
| 72 ], |
| 73 }, |
| 35 ], | 74 ], |
| 36 'action': [ | 75 }], |
| 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 ], | 76 ], |
| 45 }, | 77 }, |
| 46 ], | 78 ], |
| 47 }], | 79 }], |
| 48 ], | 80 ], |
| 49 } | 81 } |
| OLD | NEW |