Chromium Code Reviews| Index: syzygy/integration_tests/make_integration_tests_clang.py |
| diff --git a/syzygy/integration_tests/make_integration_tests_clang.py b/syzygy/integration_tests/make_integration_tests_clang.py |
| index ca4a3e97a188867006f3eeed108cd2daac8978f3..1930ebc5319bc4aff6a7b9c0d3ea4f160e2c464f 100644 |
| --- a/syzygy/integration_tests/make_integration_tests_clang.py |
| +++ b/syzygy/integration_tests/make_integration_tests_clang.py |
| @@ -65,7 +65,7 @@ def compile_with_asan(clang_path, source_files, src_dir, object_files, |
| return ret |
| -def link(clang_path, object_files, build_dir, target_name): |
| +def link(clang_path, object_files, build_dir, target_name, def_file): |
| """ Links the object files and produces the integration_tests_clang_dll.dll. |
| Links the object files and produces the dll. The object files have to be |
| @@ -85,7 +85,8 @@ def link(clang_path, object_files, build_dir, target_name): |
| '/dll', |
| os.path.join(build_dir, 'export_dll.dll.lib'), |
| os.path.join(build_dir, 'syzyasan_rtl.dll.lib'), |
| - '-defaultlib:libcmt' |
| + '-defaultlib:libcmt', |
| + '/def:' + def_file, |
|
Sébastien Marchand
2017/07/19 13:57:29
You also want to produce a PDB, otherwise you won'
njanevsk
2017/07/19 20:58:57
Added /debug which produces a PDB and in the compi
|
| ] |
| linker_command = [clang_path, '-m32'] |
| @@ -104,6 +105,7 @@ def main(): |
| help='Path to the Syzygy Release directory.') |
| parser.add_option('--input-files', help='Files to be compiled and linked.') |
| parser.add_option('--target-name', help='Name of the target to be compiled.') |
| + parser.add_option('--def-file', help='Definition file for the dll.') |
| options, _ = parser.parse_args() |
| @@ -113,6 +115,8 @@ def main(): |
| parser.error('--input-files is required.') |
| if not options.target_name: |
| parser.error('--target-name is required.') |
| + if not options.def_file: |
| + parser.error('--def-file is required.') |
| def get_object_file_location(source_file, |
| output_dir, target_name): |
| @@ -134,7 +138,7 @@ def main(): |
| if ret == 0: |
| ret = link(_CLANG_CL_PATH, object_files, options.output_dir, |
| - options.target_name) |
| + options.target_name, options.def_file) |
| else: |
| print ('ERROR: Compilation of %s failed, skipping link step.' |
| % options.target_name) |