OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import multiprocessing | 6 import multiprocessing |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import shutil | 9 import shutil |
10 import subprocess | 10 import subprocess |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 help='Specify the path to the ASAN agent_logger.exe relative to ' | 211 help='Specify the path to the ASAN agent_logger.exe relative to ' |
212 'build-dir (%default).') | 212 'build-dir (%default).') |
213 parser.add_option( | 213 parser.add_option( |
214 '--pdbfind_exe', default=default_pdbfind_exe, | 214 '--pdbfind_exe', default=default_pdbfind_exe, |
215 help='Specify the path to the ASAN pdbfind.exe relative to ' | 215 help='Specify the path to the ASAN pdbfind.exe relative to ' |
216 'build-dir (%default).') | 216 'build-dir (%default).') |
217 parser.add_option( | 217 parser.add_option( |
218 '--runtime_path', default=default_runtime_path, | 218 '--runtime_path', default=default_runtime_path, |
219 help='Specify the path to the ASAN runtime DLL relative to ' | 219 help='Specify the path to the ASAN runtime DLL relative to ' |
220 'build-dir (%default).') | 220 'build-dir (%default).') |
| 221 parser.add_option('--src-dir', help='path to the top-level sources directory') |
221 options, args = parser.parse_args() | 222 options, args = parser.parse_args() |
222 options.build_dir = build_directory.GetBuildOutputDirectory() | 223 options.build_dir = build_directory.GetBuildOutputDirectory( |
| 224 src_dir=options.src_dir) |
223 | 225 |
224 options.build_dir = os.path.abspath(options.build_dir) | 226 options.build_dir = os.path.abspath(options.build_dir) |
225 | 227 |
226 if not options.build_dir: | 228 if not options.build_dir: |
227 parser.error('Must specify --build-dir') | 229 parser.error('Must specify --build-dir') |
228 if not options.target: | 230 if not options.target: |
229 parser.error('Must specify --target') | 231 parser.error('Must specify --target') |
230 if args: | 232 if args: |
231 parser.error('Not expecting additional arguments') | 233 parser.error('Not expecting additional arguments') |
232 | 234 |
(...skipping 25 matching lines...) Expand all Loading... |
258 print 'Default BLACKLIST is: %r' % BLACKLIST | 260 print 'Default BLACKLIST is: %r' % BLACKLIST |
259 | 261 |
260 return ApplyAsanToBuild(options.full_directory, | 262 return ApplyAsanToBuild(options.full_directory, |
261 options.instrument_exe, | 263 options.instrument_exe, |
262 options.pdbfind_exe, | 264 options.pdbfind_exe, |
263 options.jobs) | 265 options.jobs) |
264 | 266 |
265 | 267 |
266 if __name__ == '__main__': | 268 if __name__ == '__main__': |
267 sys.exit(main()) | 269 sys.exit(main()) |
OLD | NEW |