Index: test/Driver/darwin-stdlib.cpp =================================================================== --- test/Driver/darwin-stdlib.cpp +++ test/Driver/darwin-stdlib.cpp @@ -1,3 +1,7 @@ +// This test will fail if CLANG_DEFAULT_CXX_STDLIB is set to anything different +// than the platform default. (see https://llvm.org/bugs/show_bug.cgi?id=30548) +// XFAIL: default-cxx-stdlib-set + // RUN: %clang -target x86_64-apple-darwin -arch arm64 -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX // RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min=10.8 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBSTDCXX // RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min=10.9 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX Index: test/lit.cfg =================================================================== --- test/lit.cfg +++ test/lit.cfg @@ -343,6 +343,9 @@ # Set available features we allow tests to conditionalize on. # +if config.clang_default_cxx_stdlib != '': + config.available_features.add('default-cxx-stdlib-set') + # Enabled/disabled features if config.clang_staticanalyzer != 0: config.available_features.add("staticanalyzer") Index: test/lit.site.cfg.in =================================================================== --- test/lit.site.cfg.in +++ test/lit.site.cfg.in @@ -16,6 +16,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" config.have_zlib = "@HAVE_LIBZ@" config.clang_arcmt = @ENABLE_CLANG_ARCMT@ +config.clang_default_cxx_stdlib = "@CLANG_DEFAULT_CXX_STDLIB@" config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@ config.clang_examples = @ENABLE_CLANG_EXAMPLES@ config.enable_shared = @ENABLE_SHARED@