From 789b7f0828b08f5c4bf9ff1ff7ef733c73ecdc0a Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Thu, 30 May 2019 04:40:21 +0000 Subject: [runtimes] Check if pragma comment(lib, ...) is supported first This fixes the issue introduced by r362048 where we always use pragma comment(lib, ...) for dependent libraries when the compiler is Clang, but older Clang versions don't support this pragma so we need to check first if it's supported before using it. llvm-svn: 362055 --- libcxx/src/mutex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcxx/src/mutex.cpp') diff --git a/libcxx/src/mutex.cpp b/libcxx/src/mutex.cpp index d100f2df233..33a8197dadf 100644 --- a/libcxx/src/mutex.cpp +++ b/libcxx/src/mutex.cpp @@ -13,7 +13,7 @@ #include "__undef_macros" #ifndef _LIBCPP_HAS_NO_THREADS -#if defined(__unix__) && defined(__ELF__) && defined(__clang__) +#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA) #pragma comment(lib, "pthread") #endif #endif -- cgit v1.2.3