diff options
author | Petr Hosek <phosek@chromium.org> | 2019-05-30 04:40:21 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2019-05-30 04:40:21 +0000 |
commit | 789b7f0828b08f5c4bf9ff1ff7ef733c73ecdc0a (patch) | |
tree | 529f48a2d6693be385cf978860ec04995e6dfe86 /libcxx/src/filesystem/operations.cpp | |
parent | 2c91c3b7af7cd4da64f1babde3798d65522a21e4 (diff) | |
download | bcm5719-llvm-789b7f0828b08f5c4bf9ff1ff7ef733c73ecdc0a.tar.gz bcm5719-llvm-789b7f0828b08f5c4bf9ff1ff7ef733c73ecdc0a.zip |
[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
Diffstat (limited to 'libcxx/src/filesystem/operations.cpp')
-rw-r--r-- | libcxx/src/filesystem/operations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp index 319d9f65d73..69350ddfe9d 100644 --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -44,7 +44,7 @@ #include <sys/time.h> // for gettimeofday and timeval #endif // !defined(CLOCK_REALTIME) -#if defined(__unix__) && defined(__ELF__) && defined(__clang__) +#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA) #pragma comment(lib, "rt") #endif |