path: root/config.tests/unix
diff options
authorBradley T. Hughes <>2012-06-13 13:23:53 +0200
committerQt by Nokia <>2012-06-19 00:39:28 +0200
commitccf988e51087cee521b32df646de4ce3ef291de1 (patch)
treea1d43e826e6a90008bce4a4987f31ad0b0e8900f /config.tests/unix
parent60f2abff5e98072fcb912d1d6070050f56f8c81b (diff)
clang: Do not use libstdc++ when C++11 is enabled
We expect that the C++ library also supports C++11 when the compiler says it does as well. When using clang with libstdc++, the library has no C++11 support or headers, so we cannot use, for example, #include <initializer_lists>. Change-Id: I844877107256f15ab314e8f82fe54434dbb07638 Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'config.tests/unix')
1 files changed, 6 insertions, 1 deletions
diff --git a/config.tests/unix/c++11/c++11.cpp b/config.tests/unix/c++11/c++11.cpp
index d541144bf9..671723647e 100644
--- a/config.tests/unix/c++11/c++11.cpp
+++ b/config.tests/unix/c++11/c++11.cpp
@@ -42,7 +42,12 @@
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
// Compiler claims to support C++11, trust it
-# error "__cplusplus must be >= 201103L"
+# error "__cplusplus must be >= 201103L, or __GXX_EXPERIMENTAL_CXX0X__ must be defined"
+#include <utility>
+#if defined(__clang__) && !defined(_LIBCPP_VERSION)
+# error "C++11 with clang requires libc++ runtime"
int main(int, char **) { return 0; }