summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-05-30 05:38:06 +0000
committerPetr Hosek <phosek@chromium.org>2019-05-30 05:38:06 +0000
commitf1ddf431b5dd47a6c03ed1420af69facace8cb1d (patch)
tree82bf5a5cf21be79ba63bcfa689d14cb1b1d01dbb
parente4cfa89915b7e16a095272f6603a3df83b982d38 (diff)
downloadbcm5719-llvm-f1ddf431b5dd47a6c03ed1420af69facace8cb1d.tar.gz
bcm5719-llvm-f1ddf431b5dd47a6c03ed1420af69facace8cb1d.zip
[runtimes] Use -Wunknown-pragmas for the pragma check
This is a follow up to r362055, we need -Wunknown-pragmas otherwise the check is going to succeed it the pragma isn't supported. llvm-svn: 362057
-rw-r--r--libcxx/cmake/config-ix.cmake4
-rw-r--r--libcxxabi/cmake/config-ix.cmake4
-rw-r--r--libunwind/cmake/config-ix.cmake4
3 files changed, 12 insertions, 0 deletions
diff --git a/libcxx/cmake/config-ix.cmake b/libcxx/cmake/config-ix.cmake
index b2d275bbb25..cedc7679287 100644
--- a/libcxx/cmake/config-ix.cmake
+++ b/libcxx/cmake/config-ix.cmake
@@ -1,3 +1,4 @@
+include(CMakePushCheckState)
include(CheckLibraryExists)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
@@ -62,10 +63,13 @@ endif ()
# Check compiler pragmas
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-pragmas")
check_c_source_compiles("
#pragma comment(lib, \"c\")
int main() { return 0; }
" LIBCXX_HAS_COMMENT_LIB_PRAGMA)
+ cmake_pop_check_state()
endif()
if(NOT WIN32 OR MINGW)
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake
index 30d2ae237d1..04d58fcc98d 100644
--- a/libcxxabi/cmake/config-ix.cmake
+++ b/libcxxabi/cmake/config-ix.cmake
@@ -1,3 +1,4 @@
+include(CMakePushCheckState)
include(CheckLibraryExists)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
@@ -51,10 +52,13 @@ endif ()
# Check compiler pragmas
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-pragmas")
check_c_source_compiles("
#pragma comment(lib, \"c\")
int main() { return 0; }
" LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
+ cmake_pop_check_state()
endif()
# Check compiler flags
diff --git a/libunwind/cmake/config-ix.cmake b/libunwind/cmake/config-ix.cmake
index 2c27ecf5207..07a95ce1a46 100644
--- a/libunwind/cmake/config-ix.cmake
+++ b/libunwind/cmake/config-ix.cmake
@@ -1,3 +1,4 @@
+include(CMakePushCheckState)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckLibraryExists)
@@ -57,10 +58,13 @@ endif ()
# Check compiler pragmas
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-pragmas")
check_c_source_compiles("
#pragma comment(lib, \"c\")
int main() { return 0; }
" LIBUNWIND_HAS_COMMENT_LIB_PRAGMA)
+ cmake_pop_check_state()
endif()
# Check compiler flags
OpenPOWER on IntegriCloud