Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/ChooseMSVCCRT.cmake
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | variables (LLVM_USE_CRT_DEBUG, etc) instead.") | ||||
make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT}) | make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT}) | ||||
foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) | foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) | ||||
string(TOUPPER "${build_type}" build) | string(TOUPPER "${build_type}" build) | ||||
if (NOT LLVM_USE_CRT_${build}) | if (NOT LLVM_USE_CRT_${build}) | ||||
get_current_crt(LLVM_USE_CRT_${build} | get_current_crt(LLVM_USE_CRT_${build} | ||||
MSVC_CRT_REGEX | MSVC_CRT_REGEX | ||||
CMAKE_CXX_FLAGS_${build}) | CMAKE_CXX_FLAGS_${build}) | ||||
if (LLVM_TOOL_LLDB_BUILD) | |||||
if ((NOT ${build} STREQUAL "DEBUG") AND (LLVM_TOOL_CLANG_BUILD OR LLVM_TOOL_LLD_BUILD)) | |||||
message(WARNING "Disabling /MT required by LLDB. This will impact runtime performance for Clang or LLD. Preferably build them separately.") | |||||
stella.stamenova: As far as I understand, /MT is being disabled because it is required by LLDB that it be… | |||||
aganeaAuthorUnsubmitted As requested: "Disabling /MT as required by LLDB" aganea: As requested: "//Disabling /MT **as** required by LLDB//" | |||||
endif() | |||||
else() | |||||
# Make /MT the default in Release builds to make them faster | |||||
# and avoid the DLL function thunking. | |||||
if ((${build} STREQUAL "MINSIZEREL") OR | |||||
(${build} STREQUAL "RELEASE") OR | |||||
(${build} STREQUAL "RELWITHDEBINFO")) | |||||
set(LLVM_USE_CRT_${build} "MT") | |||||
endif() | |||||
endif() | |||||
set(LLVM_USE_CRT_${build} | set(LLVM_USE_CRT_${build} | ||||
"${LLVM_USE_CRT_${build}}" | "${LLVM_USE_CRT_${build}}" | ||||
CACHE STRING "Specify VC++ CRT to use for ${build_type} configurations." | CACHE STRING "Specify VC++ CRT to use for ${build_type} configurations." | ||||
FORCE) | FORCE) | ||||
set_property(CACHE LLVM_USE_CRT_${build} | set_property(CACHE LLVM_USE_CRT_${build} | ||||
PROPERTY STRINGS ;${${MSVC_CRT}}) | PROPERTY STRINGS ;${${MSVC_CRT}}) | ||||
endif(NOT LLVM_USE_CRT_${build}) | endif(NOT LLVM_USE_CRT_${build}) | ||||
endforeach(build_type) | endforeach(build_type) | ||||
Show All 30 Lines |
As far as I understand, /MT is being disabled because it is required by LLDB that it be disabled. Is that correct? If that's the case, I think the message needs to change to be clearer. For example: "Disabling /MT *as* required by LLDB". Right now it reads like /MT is being disabled but it is required by LLDB.