[compiler-rt] r290571 - test: filter out -fPIE/-pie on Windows
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 26 19:16:20 PST 2016
Author: compnerd
Date: Mon Dec 26 21:16:20 2016
New Revision: 290571
URL: http://llvm.org/viewvc/llvm-project?rev=290571&view=rev
Log:
test: filter out -fPIE/-pie on Windows
Use some new substitutions to avoid duplicating the tests for just
dropped flags. -fPIC/-fPIE/-fpic/-fpie do not make sense on Windows as
they can cause ELF-style PIC. Substitute away the flag on Windows.
This should repair the windows buildbots.
Modified:
compiler-rt/trunk/test/asan/TestCases/sanity_check_pure_c.c
compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc
compiler-rt/trunk/test/asan/lit.cfg
Modified: compiler-rt/trunk/test/asan/TestCases/sanity_check_pure_c.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/sanity_check_pure_c.c?rev=290571&r1=290570&r2=290571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/sanity_check_pure_c.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/sanity_check_pure_c.c Mon Dec 26 21:16:20 2016
@@ -3,7 +3,7 @@
// RUN: not %run %t 2>&1 | FileCheck %s
// Sanity checking a test in pure C with -pie.
-// RUN: %clang_asan -O2 %s -pie -fPIE -o %t
+// RUN: %clang_asan -O2 %s %pie %fPIE -o %t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: stable-runtime
Modified: compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc?rev=290571&r1=290570&r2=290571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc Mon Dec 26 21:16:20 2016
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
+// RUN: %clangxx_asan -O0 -DSHARED_LIB %s %fPIC -shared -o %dynamiclib %ld_flags_rpath_so
// RUN: %clangxx_asan -O0 %s -o %t %ld_flags_rpath_exe
// Check that without suppressions, we catch the issue.
Modified: compiler-rt/trunk/test/asan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=290571&r1=290570&r2=290571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/lit.cfg (original)
+++ compiler-rt/trunk/test/asan/lit.cfg Mon Dec 26 21:16:20 2016
@@ -229,6 +229,15 @@ config.suffixes = ['.c', '.cc', '.cpp']
if config.host_os == 'Darwin':
config.suffixes.append('.mm')
+if config.host_os == 'Windows':
+ config.substitutions.append(('%fPIC', ''))
+ config.substitutions.append(('%fPIE', ''))
+ config.substitutions.append(('%pie', ''))
+else:
+ config.substitutions.append(('%fPIC', '-fPIC'))
+ config.substitutions.append(('%fPIE', '-fPIE'))
+ config.substitutions.append(('%pie', '-pie'))
+
# Only run the tests on supported OSs.
if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows']:
config.unsupported = True
More information about the llvm-commits
mailing list