[libcxx-commits] [PATCH] D155561: [libcxx] Respect CMAKE_MSVC_RUNTIME_LIBRARY wrt whether to use the debug CRT
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jul 29 23:55:53 PDT 2023
mstorsjo updated this revision to Diff 545407.
mstorsjo added a comment.
Rebased
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155561/new/
https://reviews.llvm.org/D155561
Files:
libcxx/CMakeLists.txt
libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in
libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
Index: libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
===================================================================
--- libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
+++ libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
@@ -13,7 +13,7 @@
crt_lib = 'libcmt'
cxx_lib = 'libcpmt'
-if '@uppercase_CMAKE_BUILD_TYPE@' == 'DEBUG':
+if (runtime_library == '' and '@uppercase_CMAKE_BUILD_TYPE@' == 'DEBUG') or 'Debug' in runtime_library:
dbg_include = ' -D_DEBUG -include set_windows_crt_report_mode.h'
crt_lib += 'd'
cxx_lib += 'd'
Index: libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in
===================================================================
--- libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in
+++ libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in
@@ -14,7 +14,7 @@
crt_lib = 'libcmt'
cxx_lib = 'libcpmt'
-if '@uppercase_CMAKE_BUILD_TYPE@' == 'DEBUG':
+if (runtime_library == '' and '@uppercase_CMAKE_BUILD_TYPE@' == 'DEBUG') or 'Debug' in runtime_library:
dbg_include = ' -D_DEBUG -include set_windows_crt_report_mode.h'
crt_lib += 'd'
cxx_lib += 'd'
Index: libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
===================================================================
--- libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
+++ libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
@@ -13,7 +13,7 @@
crt_lib = 'libcmt'
cxx_lib = 'libcpmt'
-if '@uppercase_CMAKE_BUILD_TYPE@' == 'DEBUG':
+if (runtime_library == '' and '@uppercase_CMAKE_BUILD_TYPE@' == 'DEBUG') or 'Debug' in runtime_library:
dbg_include = ' -D_DEBUG -include set_windows_crt_report_mode.h'
crt_lib += 'd'
cxx_lib += 'd'
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -682,7 +682,8 @@
endif()
if (MSVC)
- if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ OR (CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "Debug"))
set(LIB_SUFFIX "d")
else()
set(LIB_SUFFIX "")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155561.545407.patch
Type: text/x-patch
Size: 2229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230730/5ba56d2f/attachment.bin>
More information about the libcxx-commits
mailing list