[compiler-rt] r260883 - [compiler-rt] Fix test failures when switching default C++ library

Jonas Hahnfeld via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 03:28:15 PST 2016


Author: hahnfeld
Date: Mon Feb 15 05:28:15 2016
New Revision: 260883

URL: http://llvm.org/viewvc/llvm-project?rev=260883&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc
    compiler-rt/trunk/test/tsan/lit.cfg
    compiler-rt/trunk/test/tsan/static_init6.cc

Modified: compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc?rev=260883&r1=260882&r2=260883&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc Mon Feb 15 05:28:15 2016
@@ -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

Modified: compiler-rt/trunk/test/tsan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/lit.cfg?rev=260883&r1=260882&r2=260883&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/lit.cfg (original)
+++ compiler-rt/trunk/test/tsan/lit.cfg Mon Feb 15 05:28:15 2016
@@ -55,6 +55,7 @@ if config.has_libcxx and config.host_os
   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]

Modified: compiler-rt/trunk/test/tsan/static_init6.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/static_init6.cc?rev=260883&r1=260882&r2=260883&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/static_init6.cc (original)
+++ compiler-rt/trunk/test/tsan/static_init6.cc Mon Feb 15 05:28:15 2016
@@ -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>




More information about the llvm-commits mailing list