Index: libcxx/cmake/config-ix.cmake =================================================================== --- libcxx/cmake/config-ix.cmake +++ libcxx/cmake/config-ix.cmake @@ -13,9 +13,6 @@ # built libunwind isn't installed yet). For those cases, it'd be good to # link with --uwnindlib=none. Check if that option works. llvm_check_compiler_linker_flag(C "--unwindlib=none" CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG) -if (CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} --unwindlib=none") -endif() if(WIN32 AND NOT MINGW) # NOTE(compnerd) this is technically a lie, there is msvcrt, but for now, lets Index: libunwind/CMakeLists.txt =================================================================== --- libunwind/CMakeLists.txt +++ libunwind/CMakeLists.txt @@ -185,15 +185,6 @@ # Setup Compiler Flags #=============================================================================== -# Compiler tests may be failing if the compiler implicitly links in libunwind, -# which doesn't exist yet. This gets waived by --unwindlib=none -# later in config-ix below, but the tests for --target etc before that may -# be failing due to it. Only test compilation, not linking, for these -# tests here now. -set(CMAKE_TRY_COMPILE_TARGET_TYPE_ORIG ${CMAKE_TRY_COMPILE_TARGET_TYPE}) -set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) -set(CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE_ORIG}) - # Configure compiler. include(config-ix) Index: libunwind/cmake/config-ix.cmake =================================================================== --- libunwind/cmake/config-ix.cmake +++ libunwind/cmake/config-ix.cmake @@ -10,9 +10,6 @@ # might not work if libunwind doesn't exist yet. Try to check if # --unwindlib=none is supported, and use that if possible. llvm_check_compiler_linker_flag(C "--unwindlib=none" CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG) -if (CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} --unwindlib=none") -endif() check_library_exists(c fopen "" LIBUNWIND_HAS_C_LIB)