[libcxx] r279596 - Revert "libc++: Perform configuration checks with -nodefaultlibs"

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 23 17:24:05 PDT 2016


Author: compnerd
Date: Tue Aug 23 19:24:05 2016
New Revision: 279596

URL: http://llvm.org/viewvc/llvm-project?rev=279596&view=rev
Log:
Revert "libc++: Perform configuration checks with -nodefaultlibs"

This reverts SVN r279584 which broke the buildbots.  Will re-apply once the
issue has been root-caused and fixed.

Modified:
    libcxx/trunk/cmake/config-ix.cmake

Modified: libcxx/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/config-ix.cmake?rev=279596&r1=279595&r2=279596&view=diff
==============================================================================
--- libcxx/trunk/cmake/config-ix.cmake (original)
+++ libcxx/trunk/cmake/config-ix.cmake Tue Aug 23 19:24:05 2016
@@ -1,26 +1,5 @@
 include(CheckLibraryExists)
 include(CheckCXXCompilerFlag)
-
-check_library_exists(c fopen "" LIBCXX_HAS_C_LIB)
-check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXX_HAS_GCC_S_LIB)
-
-# libc++ is built with -nodefaultlibs, so we want all our checks to also
-# use this option, otherwise we may end up with an inconsistency between
-# the flags we think we require during configuration (if the checks are
-# performed without -nodefaultlibs) and the flags that are actually
-# required during compilation (which has the -nodefaultlibs). libc is
-# required for the link to go through.
-check_cxx_compiler_flag(-nodefaultlibs LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
-if (LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
-  list(APPEND CMAKE_REQUIRED_LIBRARIES -nodefaultlibs)
-  if (LIBCXX_HAS_C_LIB)
-    list(APPEND CMAKE_REQUIRED_LIBRARIES c)
-  endif ()
-  if (LIBCXX_HAS_GCC_S_LIB)
-    list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
-  endif ()
-endif ()
-
 include(CheckLibcxxAtomic)
 
 # Check compiler flags
@@ -35,5 +14,7 @@ check_cxx_compiler_flag(/GR-
 
 # Check libraries
 check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
+check_library_exists(c fopen "" LIBCXX_HAS_C_LIB)
 check_library_exists(m ccos "" LIBCXX_HAS_M_LIB)
 check_library_exists(rt clock_gettime "" LIBCXX_HAS_RT_LIB)
+check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXX_HAS_GCC_S_LIB)




More information about the cfe-commits mailing list