diff options
author | sebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 01:52:48 +0000 |
---|---|---|
committer | sebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 01:52:48 +0000 |
commit | 8c07f843fb22b629cae62943054d13595c8a3cc4 (patch) | |
tree | 90742aef7ae265e896a62dab32ff1ef247c6dda0 /chrome/chrome_syzygy.gyp | |
parent | 41497ab3101816bc8a76413df671de208d7b90ba (diff) | |
download | chromium_src-8c07f843fb22b629cae62943054d13595c8a3cc4.zip chromium_src-8c07f843fb22b629cae62943054d13595c8a3cc4.tar.gz chromium_src-8c07f843fb22b629cae62943054d13595c8a3cc4.tar.bz2 |
Add a script to produce a syzygy-instrumented image of Chrome.dll
I've also modified the chrome_syzygy.gyp file to automaticaly produce the SyzyAsan'd version of Chrome.dll if 'asan'=1 on Windows.
TBR=sky@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/12095105
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181401 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_syzygy.gyp')
-rw-r--r-- | chrome/chrome_syzygy.gyp | 78 |
1 files changed, 55 insertions, 23 deletions
diff --git a/chrome/chrome_syzygy.gyp b/chrome/chrome_syzygy.gyp index 07c25de..7ea4a04 100644 --- a/chrome/chrome_syzygy.gyp +++ b/chrome/chrome_syzygy.gyp @@ -4,11 +4,9 @@ { 'conditions': [ ['OS=="win" and fastbuild==0', { - # Reorder the initial chrome DLL executable, placing the optimized - # output and corresponding PDB file into the "syzygy" subdirectory. - # If there's a matching chrome.dll-ordering.json file present in - # the output directory, chrome.dll will be ordered according to that, - # otherwise it will be randomized. + # Reorder or instrument the initial chrome DLL executable, placing the + # optimized output and corresponding PDB file into the "syzygy" + # subdirectory. # This target won't build in fastbuild, since there are no PDBs. 'targets': [ { @@ -21,26 +19,60 @@ 'variables': { 'dest_dir': '<(PRODUCT_DIR)\\syzygy', }, - 'actions': [ - { - 'action_name': 'Reorder Chrome with Syzygy', - 'msvs_cygwin_shell': 0, - 'inputs': [ - '<(PRODUCT_DIR)\\chrome.dll', - '<(PRODUCT_DIR)\\chrome.dll.pdb', + 'conditions': [ + ['asan!=1', { + # Reorder chrome DLL executable. + # If there's a matching chrome.dll-ordering.json file present in + # the output directory, chrome.dll will be ordered according to + # that, otherwise it will be randomized. + 'actions': [ + { + 'action_name': 'Reorder Chrome with Syzygy', + 'msvs_cygwin_shell': 0, + 'inputs': [ + '<(PRODUCT_DIR)\\chrome.dll', + '<(PRODUCT_DIR)\\chrome.dll.pdb', + ], + 'outputs': [ + '<(dest_dir)\\chrome.dll', + '<(dest_dir)\\chrome.dll.pdb', + ], + 'action': [ + 'python', + '<(DEPTH)/chrome/tools/build/win/syzygy_reorder.py', + '--input_executable', '<(PRODUCT_DIR)\\chrome.dll', + '--input_symbol', '<(PRODUCT_DIR)\\chrome.dll.pdb', + '--destination_dir', '<(dest_dir)', + ], + }, ], - 'outputs': [ - '<(dest_dir)\\chrome.dll', - '<(dest_dir)\\chrome.dll.pdb', + }, { + # Instrument chrome DLL executable with SyzyAsan. + 'actions': [ + { + 'action_name': 'Instrument Chrome with SyzyAsan', + 'msvs_cygwin_shell': 0, + 'inputs': [ + '<(PRODUCT_DIR)\\chrome.dll', + '<(PRODUCT_DIR)\\chrome.dll.pdb', + ], + 'outputs': [ + '<(dest_dir)\\chrome.dll', + '<(dest_dir)\\chrome.dll.pdb', + ], + 'action': [ + 'python', + '<(DEPTH)/chrome/tools/build/win/syzygy_instrument.py', + '--mode', 'asan', + '--agent_dll', '<(DEPTH)\\third_party\\syzygy\\binaries' + '\\exe\\asan_rtl.dll', + '--input_executable', '<(PRODUCT_DIR)\\chrome.dll', + '--input_symbol', '<(PRODUCT_DIR)\\chrome.dll.pdb', + '--destination_dir', '<(dest_dir)', + ], + }, ], - 'action': [ - 'python', - '<(DEPTH)/chrome/tools/build/win/syzygy_reorder.py', - '--input_executable', '<(PRODUCT_DIR)\\chrome.dll', - '--input_symbol', '<(PRODUCT_DIR)\\chrome.dll.pdb', - '--destination_dir', '<(dest_dir)', - ], - }, + }], ], }, ], |