summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-02-15 11:28:15 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-02-15 11:28:15 +0000
commitccb0e464bea19b6df1758a0b20e367a4779d5073 (patch)
treeb5c6c5b1f1e00eb6bd0600d2da313e437392f57b /compiler-rt/test
parentc4feaf0272a8fafabb3206f97e8e2c0bc29b6c08 (diff)
downloadbcm5719-llvm-ccb0e464bea19b6df1758a0b20e367a4779d5073.tar.gz
bcm5719-llvm-ccb0e464bea19b6df1758a0b20e367a4779d5073.zip
[compiler-rt] Fix test failures when switching default C++ library
1. Add two explicit -stdlib=libstdc++ in conjunction with -static-libstdc++ 2. Pass -nostdinc++ when adding include paths for libc++ built for tsan. This prevents clang finding the headers twice which would confuse #include_next Differential Revision: http://reviews.llvm.org/D17189 llvm-svn: 260883
Diffstat (limited to 'compiler-rt/test')
-rw-r--r--compiler-rt/test/asan/TestCases/throw_invoke_test.cc2
-rw-r--r--compiler-rt/test/tsan/lit.cfg1
-rw-r--r--compiler-rt/test/tsan/static_init6.cc2
3 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/TestCases/throw_invoke_test.cc b/compiler-rt/test/asan/TestCases/throw_invoke_test.cc
index ec48fc7b6a4..3e594b60825 100644
--- a/compiler-rt/test/asan/TestCases/throw_invoke_test.cc
+++ b/compiler-rt/test/asan/TestCases/throw_invoke_test.cc
@@ -1,5 +1,5 @@
// RUN: %clangxx_asan %s -o %t && %run %t
-// RUN: %clangxx_asan %s -o %t -static-libstdc++ && %run %t
+// RUN: %clangxx_asan %s -o %t -stdlib=libstdc++ -static-libstdc++ && %run %t
// Clang doesn't support exceptions on Windows yet.
// XFAIL: win32
diff --git a/compiler-rt/test/tsan/lit.cfg b/compiler-rt/test/tsan/lit.cfg
index d141fc22851..aa74ad84918 100644
--- a/compiler-rt/test/tsan/lit.cfg
+++ b/compiler-rt/test/tsan/lit.cfg
@@ -55,6 +55,7 @@ if config.has_libcxx and config.host_os != 'Darwin':
libcxx_libdir = os.path.join(libcxx_path, "lib")
libcxx_so = os.path.join(libcxx_libdir, "libc++.so")
clang_tsan_cxxflags += ["-std=c++11",
+ "-nostdinc++",
"-I%s" % libcxx_incdir,
libcxx_so,
"-Wl,-rpath=%s" % libcxx_libdir]
diff --git a/compiler-rt/test/tsan/static_init6.cc b/compiler-rt/test/tsan/static_init6.cc
index 77253eac173..0bfefe345bd 100644
--- a/compiler-rt/test/tsan/static_init6.cc
+++ b/compiler-rt/test/tsan/static_init6.cc
@@ -1,4 +1,4 @@
-// RUN: %clangxx_tsan -static-libstdc++ -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -stdlib=libstdc++ -static-libstdc++ -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
OpenPOWER on IntegriCloud