Skip to content

Commit 618e5d2

Browse files
authored
[CMake] Fully delete the deprecated LLVM_USE_CRT* (llvm#66850)
This has been deprecated in favor of CMake's CMAKE_MSVC_RUNTIME_LIBRARY in c6bd873 . Current release branch still contains it in deprecated status so no existing end-users will be affected.
1 parent ecfdc23 commit 618e5d2

File tree

7 files changed

+2
-76
lines changed

7 files changed

+2
-76
lines changed

clang/cmake/caches/CrossWinToARMLinux.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ set(CLANG_DEFAULT_LINKER "lld" CACHE STRING "")
9595

9696
if(WIN32)
9797
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded" CACHE STRING "")
98-
set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "")
9998
endif()
10099

101100
# Set up RPATH for the target runtime/builtin libraries.

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
3030
set(LLDB_ENABLE_LIBEDIT OFF CACHE BOOL "")
3131

3232
if(WIN32)
33-
set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "")
3433
set(FUCHSIA_DISABLE_DRIVER_BUILD ON)
3534
endif()
3635

clang/cmake/caches/Fuchsia.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ foreach(variable ${_FUCHSIA_BOOTSTRAP_PASSTHROUGH})
7070
endif()
7171
endforeach()
7272

73-
if(WIN32)
74-
set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "")
75-
endif()
76-
7773
set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
7874
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
7975
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")

llvm/cmake/modules/ChooseMSVCCRT.cmake

Lines changed: 0 additions & 58 deletions
This file was deleted.

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ endif()
470470
option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
471471

472472
if( MSVC )
473-
include(ChooseMSVCCRT)
474473

475474
# Add definitions that make MSVC much less annoying.
476475
add_compile_definitions(
@@ -951,7 +950,7 @@ if(LLVM_USE_SANITIZER)
951950
endif()
952951
# Prepare ASAN runtime if needed
953952
if (LLVM_USE_SANITIZER MATCHES ".*Address.*")
954-
if (${LLVM_USE_CRT_${uppercase_CMAKE_BUILD_TYPE}} MATCHES "^(MT|MTd)$")
953+
if (${CMAKE_MSVC_RUNTIME_LIBRARY} MATCHES "^(MultiThreaded|MultiThreadedDebug)$")
955954
append("/wholearchive:clang_rt.asan-${arch}.lib /wholearchive:clang_rt.asan_cxx-${arch}.lib"
956955
CMAKE_EXE_LINKER_FLAGS)
957956
append("/wholearchive:clang_rt.asan_dll_thunk-${arch}.lib"

llvm/cmake/modules/LLVMConfig.cmake.in

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ set(LLVM_PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@)
1414

1515
set(LLVM_BUILD_TYPE @CMAKE_BUILD_TYPE@)
1616

17-
set(LLVM_USE_CRT_DEBUG @LLVM_USE_CRT_DEBUG@)
18-
set(LLVM_USE_CRT_MINSIZEREL @LLVM_USE_CRT_MINSIZEREL@)
19-
set(LLVM_USE_CRT_RELEASE @LLVM_USE_CRT_RELEASE@)
20-
set(LLVM_USE_CRT_RELWITHDEBINFO @LLVM_USE_CRT_RELWITHDEBINFO@)
17+
set(CMAKE_MSVC_RUNTIME_LIBRARY @CMAKE_MSVC_RUNTIME_LIBRARY@)
2118

2219
set(LLVM_USE_SPLIT_DWARF @LLVM_USE_SPLIT_DWARF@)
2320

llvm/docs/CMake.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -777,12 +777,6 @@ enabled sub-projects. Nearly all of these variable names begin with
777777
``LLVM_USE_SANITIZER`` contains ``Undefined``. This can be used to override
778778
the default set of UBSan flags.
779779

780-
**LLVM_USE_CRT_{target}**:STRING
781-
On Windows, tells which version of the C runtime library (CRT) should be used.
782-
For example, -DLLVM_USE_CRT_RELEASE=MT would statically link the CRT into the
783-
LLVM tools and library. This is deprecated; use ``CMAKE_MSVC_RUNTIME_LIBRARY``
784-
instead.
785-
786780
**LLVM_USE_INTEL_JITEVENTS**:BOOL
787781
Enable building support for Intel JIT Events API. Defaults to OFF.
788782

0 commit comments

Comments
 (0)