diff options
author | Petr Hosek <phosek@chromium.org> | 2017-04-06 21:06:33 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-04-06 21:06:33 +0000 |
commit | effdf248ec678a8f5fd1f139428a94c0de272dd9 (patch) | |
tree | e3e283cf75fde74076dc6e6facf200312bedf46a /cmake | |
parent | abdcc5c29c095fa6af2e53f7010881947de57dab (diff) | |
download | external_libcxx-effdf248ec678a8f5fd1f139428a94c0de272dd9.tar.gz external_libcxx-effdf248ec678a8f5fd1f139428a94c0de272dd9.tar.bz2 external_libcxx-effdf248ec678a8f5fd1f139428a94c0de272dd9.zip |
[CMake][libcxx] Use check_c_compiler_flag to check for nodefaultlibs
We're using -nodefaultlibs to avoid the dependency on C++ library
when using check_cxx_compiler_flag, and as such we cannot use
check_cxx_compiler_flag to check the availability of -nodefaultlibs
itself.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/config-ix.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 5f31cfac3..c425c31ea 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -1,4 +1,5 @@ include(CheckLibraryExists) +include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) if(WIN32 AND NOT MINGW) @@ -24,7 +25,7 @@ endif() # required during compilation (which has the -nodefaultlibs). libc is # required for the link to go through. We remove sanitizers from the # configuration checks to avoid spurious link errors. -check_cxx_compiler_flag(-nodefaultlibs LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG) +check_c_compiler_flag(-nodefaultlibs LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG) if (LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nodefaultlibs") if (LIBCXX_HAS_C_LIB) |