diff options
author | sebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-17 08:59:30 +0000 |
---|---|---|
committer | sebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-17 08:59:30 +0000 |
commit | f5858a86634f595638dff89dba4fee9149419f7d (patch) | |
tree | 6451e738acc744d68f280ade969327275d8dee11 /chrome/tools | |
parent | 10e0513470f5a0b78284350f3b2fa1f8ef675f48 (diff) | |
download | chromium_src-f5858a86634f595638dff89dba4fee9149419f7d.zip chromium_src-f5858a86634f595638dff89dba4fee9149419f7d.tar.gz chromium_src-f5858a86634f595638dff89dba4fee9149419f7d.tar.bz2 |
Copy asan_rtl.* and agent_logger.exe to the syzygy directory for the ASan builds.
This is my second attempt to do this, the first time https://codereview.chromium.org/23460023/ has been reverted (https://codereview.chromium.org/23858006) because the new target 'copy_syzyasan_binaries' was not build, so the SyzyASan binaries were missing from the syzygy dir...
Currently the syzygy_optimize script was taking care of copying asan_rtl.[dll|pdb] to the syzygy directory, this was causing 2 warnings when building a SyzyASan splitted build with ninja:
- ninja: warning: multiple rules generate syzygy\asan_rtl.dll. builds involving this target will not be correct; continuing anyway
- ninja: warning: multiple rules generate syzygy\asan_rtl.dll.pdb. builds involving this target will not be correct; continuing anyway
The multiple rules come from the fact that both syzygy\chrome.dll and syzygy\chrome_child.dll were trying to generate those artifacts.
I've also added agent_logger.exe to the syzygy directory, with this it'll be easier for the person grabing a SyzyASan build from the LKGR builder to use it.
I've also removed all the "--agent-dll" logic from syzygy_instrument.py as it was only copying the asan binaries to the syzygy directory, it's now done directly in the 'copy_syzyasan_binaries' gyp target.
R=chrisha@chromium.org
BUG=
Review URL: https://codereview.chromium.org/25890006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-x | chrome/tools/build/win/syzygy_instrument.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/chrome/tools/build/win/syzygy_instrument.py b/chrome/tools/build/win/syzygy_instrument.py index 6c6fcfe..ae6558e 100755 --- a/chrome/tools/build/win/syzygy_instrument.py +++ b/chrome/tools/build/win/syzygy_instrument.py @@ -22,10 +22,6 @@ _DEFAULT_SYZYGY_DIR = os.path.abspath(os.path.join( # Basenames of various tools. _INSTRUMENT_EXE = 'instrument.exe' _GENFILTER_EXE = 'genfilter.exe' -_ASAN_AGENT_DLL = 'syzyasan_rtl.dll' - -# Default agents for known modes. -_DEFAULT_AGENT_DLLS = { 'asan': _ASAN_AGENT_DLL } _LOGGER = logging.getLogger() @@ -87,24 +83,6 @@ def _InstrumentBinary(syzygy_dir, mode, executable, symbol, dst_dir, return _Shell(*cmd) -def _CopyAgentDLL(agent_dll, destination_dir): - """Copy the agent DLL and PDB to the destination directory.""" - dirname, agent_name = os.path.split(agent_dll); - agent_dst_name = os.path.join(destination_dir, agent_name); - shutil.copyfile(agent_dll, agent_dst_name) - - # Search for the corresponding PDB file. We use this approach because - # the naming convention for PDBs has changed recently (from 'foo.pdb' - # to 'foo.dll.pdb') and we want to support both conventions during the - # transition. - agent_pdbs = glob.glob(os.path.splitext(agent_dll)[0] + '*.pdb') - if len(agent_pdbs) != 1: - raise RuntimeError('Failed to locate PDB file for %s' % agent_name) - agent_pdb = agent_pdbs[0] - agent_dst_pdb = os.path.join(destination_dir, os.path.split(agent_pdb)[1]) - shutil.copyfile(agent_pdb, agent_dst_pdb) - - def main(options): # Make sure the destination directory exists. if not os.path.isdir(options.destination_dir): @@ -128,9 +106,6 @@ def main(options): options.destination_dir, options.output_filter_file) - # Copy the agent DLL and PDB to the destination directory. - _CopyAgentDLL(options.agent_dll, options.destination_dir); - def _ParseOptions(): option_parser = optparse.OptionParser() @@ -140,9 +115,6 @@ def _ParseOptions(): help='The path to the input symbol file.') option_parser.add_option('--mode', help='Specifies which instrumentation mode is to be used.') - option_parser.add_option('--agent_dll', - help='The agent DLL used by this instrumentation. If not specified a ' - 'default will be searched for.') option_parser.add_option('--syzygy-dir', default=_DEFAULT_SYZYGY_DIR, help='Instrumenter executable to use, defaults to "%default".') option_parser.add_option('-d', '--destination_dir', @@ -166,14 +138,6 @@ def _ParseOptions(): if options.filter and not options.output_filter_file: option_parser.error('You must provide a filter output file.') - if not options.agent_dll: - if not options.mode in _DEFAULT_AGENT_DLLS: - option_parser.error('No known default agent DLL for mode "%s".' % - options.mode) - options.agent_dll = os.path.abspath(os.path.join(options.syzygy_dir, - _DEFAULT_AGENT_DLLS[options.mode])) - _LOGGER.info('Using default agent DLL: %s' % options.agent_dll) - return options |