[PATCH] D51757: [libfuzzer] Use cl driver mode for tests and enable another test on Windows
Jonathan Metzman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 6 18:12:44 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT341622: [libfuzzer] Use cl driver mode for tests and enable another test on Windows (authored by metzman, committed by ).
Herald added subscribers: Sanitizers, llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D51757?vs=164342&id=164344#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D51757
Files:
test/fuzzer/exit_on_src_pos.test
test/fuzzer/lit.cfg
Index: test/fuzzer/lit.cfg
===================================================================
--- test/fuzzer/lit.cfg
+++ test/fuzzer/lit.cfg
@@ -69,10 +69,14 @@
config.runtime_library_dir)
elif any(x in config.target_triple for x in ('darwin', 'freebsd')):
link_cmd = '-lc++'
+ elif 'windows-msvc' in config.target_triple:
+ link_cmd = ''
else:
link_cmd = '-lstdc++'
- if is_cpp and not sys.platform.startswith('win'):
+ if is_cpp and 'windows-msvc' in config.target_triple:
+ std_cmd = '--driver-mode=cl'
+ elif is_cpp:
std_cmd = '--driver-mode=g++ -std=c++11'
else:
std_cmd = ''
Index: test/fuzzer/exit_on_src_pos.test
===================================================================
--- test/fuzzer/exit_on_src_pos.test
+++ test/fuzzer/exit_on_src_pos.test
@@ -1,11 +1,11 @@
-# FIXME: Disabled on Windows until symbolization works properly.
-UNSUPPORTED: windows
# Temporary use -mllvm -use-unknown-locations=Disable so that
# all instructions have debug info (file line numbers) attached.
# TODO: Find out why test fails on Darwin with -O2.
-RUN: %cpp_compiler -O0 %S/SimpleTest.cpp -o %t-SimpleTest -mllvm -use-unknown-locations=Disable
-RUN: %cpp_compiler -O0 %S/ShrinkControlFlowTest.cpp -o %t-ShrinkControlFlowTest
+# Binaries must end in .exe or else symbolization will break on Windows because of how periods
+# in expansion of %t cause the compiler to overwrite .lib and .exp files.
+RUN: %cpp_compiler -O0 %S/SimpleTest.cpp -o %t-SimpleTest.exe -mllvm -use-unknown-locations=Disable
+RUN: %cpp_compiler -O0 %S/ShrinkControlFlowTest.cpp -o %t-ShrinkControlFlowTest.exe
-RUN: %run %t-SimpleTest -exit_on_src_pos=SimpleTest.cpp:18 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS
-RUN: %run %t-ShrinkControlFlowTest -exit_on_src_pos=Foo 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS
+RUN: %run %t-SimpleTest.exe -exit_on_src_pos=SimpleTest.cpp:18 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS
+RUN: %run %t-ShrinkControlFlowTest.exe -exit_on_src_pos=Foo 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS
EXIT_ON_SRC_POS: INFO: found line matching '{{.*}}', exiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51757.164344.patch
Type: text/x-patch
Size: 2169 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180907/1325b3a0/attachment.bin>
More information about the llvm-commits
mailing list