Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: syzygy/integration_tests/make_integration_tests_clang.py

Issue 2981233002: Add .def file for the clang instrumented integration tests dll. (Closed)
Patch Set: Add def file and a flag to the linker to generate the pdb file. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..7b3651c2459365d33665123050f233d8856f8d43 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,12 +85,15 @@ 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',
+ '/debug:full',
Sébastien Marchand 2017/07/19 15:27:26 You also need to specify /Zi during the compile st
+ '/def:' + def_file,
]
linker_command = [clang_path, '-m32']
linker_command.extend(object_files)
linker_command.extend(linker_flags)
+ print linker_command
Sébastien Marchand 2017/07/19 15:27:26 Remove the debugging code.
njanevsk 2017/07/19 16:00:35 Done.
ret = subprocess.call(linker_command)
if ret != 0:
@@ -104,6 +107,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 +117,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 +140,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)

Powered by Google App Engine
This is Rietveld 408576698