[clang] b413e44 - [CMake] Don't use libc++ by default on Windows yet
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 8 23:57:29 PDT 2021
Author: Petr Hosek
Date: 2021-06-08T23:57:14-07:00
New Revision: b413e44200e715c254fa9a41f6a86f8761c9b362
URL: https://github.com/llvm/llvm-project/commit/b413e44200e715c254fa9a41f6a86f8761c9b362
DIFF: https://github.com/llvm/llvm-project/commit/b413e44200e715c254fa9a41f6a86f8761c9b362.diff
LOG: [CMake] Don't use libc++ by default on Windows yet
libc++ has issues when used with -fno-exceptions and vcruntime,
don't use it on Windows by default until we address those issues.
Differential Revision: https://reviews.llvm.org/D103941
Added:
Modified:
clang/cmake/caches/Fuchsia-stage2.cmake
clang/cmake/caches/Fuchsia.cmake
Removed:
################################################################################
diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 60eb62728c94..bc955b17c130 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -30,7 +30,9 @@ if(WIN32)
set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "")
endif()
-set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
+if(NOT WIN32)
+ set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
+endif()
if(NOT APPLE)
# TODO: Remove this once we switch to ld64.lld.
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
@@ -93,7 +95,6 @@ if(WIN32)
set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXX_ENABLE_ABI_LINKER_SCRIPT OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
- set(RUNTIMES_${target}_LIBCXX_NO_VCRUNTIME ON CACHE BOOL "")
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx" CACHE STRING "")
endif()
diff --git a/clang/cmake/caches/Fuchsia.cmake b/clang/cmake/caches/Fuchsia.cmake
index 2f6580022ba0..bb88ff7e72cd 100644
--- a/clang/cmake/caches/Fuchsia.cmake
+++ b/clang/cmake/caches/Fuchsia.cmake
@@ -21,7 +21,9 @@ if(WIN32)
set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "")
endif()
-set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
+if(NOT WIN32)
+ set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
+endif()
if(NOT APPLE)
# TODO: Remove this once we switch to ld64.lld.
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
@@ -66,7 +68,6 @@ if(WIN32)
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
set(LIBCXX_ENABLE_ABI_LINKER_SCRIPT OFF CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY OFF CACHE BOOL "")
- set(LIBCXX_NO_VCRUNTIME ON CACHE BOOL "")
set(BUILTINS_CMAKE_ARGS -DCMAKE_SYSTEM_NAME=Windows CACHE STRING "")
set(RUNTIMES_CMAKE_ARGS -DCMAKE_SYSTEM_NAME=Windows CACHE STRING "")
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx" CACHE STRING "")
More information about the cfe-commits
mailing list