Skip to content

Revert "Remember LLVM_ENABLE_LIBCXX setting in installed configuration" #153898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions llvm/cmake/modules/HandleLLVMStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# if the user has requested it.

include(DetermineGCCCompatible)
include(CheckIncludeFiles)

if(NOT DEFINED LLVM_STDLIB_HANDLED)
set(LLVM_STDLIB_HANDLED ON)
Expand All @@ -20,17 +19,7 @@ if(NOT DEFINED LLVM_STDLIB_HANDLED)
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
check_cxx_compiler_flag("-stdlib=libc++" CXX_COMPILER_SUPPORTS_STDLIB)
check_linker_flag(CXX "-stdlib=libc++" CXX_LINKER_SUPPORTS_STDLIB)

# Check whether C++ include files are available
# runtimes/CMakeLists.txt adds -nostdlib++ and -nostdinc++ to
# CMAKE_REQUIRED_FLAGS, which are incompatible with -stdlib=libc++; use
# a fresh CMAKE_REQUIRED_FLAGS environment.
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -stdlib=libc++")
check_include_files("chrono" CXX_COMPILER_SUPPORTS_STDLIB_CHRONO LANGUAGE CXX)
cmake_pop_check_state()

if(CXX_COMPILER_SUPPORTS_STDLIB AND CXX_LINKER_SUPPORTS_STDLIB AND CXX_COMPILER_SUPPORTS_STDLIB_CHRONO)
if(CXX_COMPILER_SUPPORTS_STDLIB AND CXX_LINKER_SUPPORTS_STDLIB)
append("-stdlib=libc++"
CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS)
Expand Down
2 changes: 0 additions & 2 deletions llvm/cmake/modules/LLVMConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ endif()

set(LLVM_ENABLE_RTTI @LLVM_ENABLE_RTTI@)

set(LLVM_ENABLE_LIBCXX @LLVM_ENABLE_LIBCXX@)

set(LLVM_ENABLE_LIBEDIT @HAVE_LIBEDIT@)
if(LLVM_ENABLE_LIBEDIT)
find_package(LibEdit)
Expand Down
Loading