[libcxx-commits] [PATCH] D154698: [libcxx] Check MSVC flag directly instead of setting LIBCXX_TARGETING_MSVC
David Spickett via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 7 03:02:07 PDT 2023
DavidSpickett updated this revision to Diff 538055.
DavidSpickett added a comment.
Remove empty else.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154698/new/
https://reviews.llvm.org/D154698
Files:
libcxx/CMakeLists.txt
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -38,10 +38,7 @@
endif()
if (MSVC)
- set(LIBCXX_TARGETING_MSVC ON)
message(STATUS "Configuring for MSVC")
-else()
- set(LIBCXX_TARGETING_MSVC OFF)
endif()
#===============================================================================
@@ -198,7 +195,7 @@
option(LIBCXX_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
# ABI Library options ---------------------------------------------------------
-if (LIBCXX_TARGETING_MSVC)
+if (MSVC)
set(LIBCXX_DEFAULT_ABI_LIBRARY "vcruntime")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(LIBCXX_DEFAULT_ABI_LIBRARY "libcxxrt")
@@ -569,7 +566,7 @@
# RTTI flags ==================================================================
function(cxx_add_rtti_flags target)
if (NOT LIBCXX_ENABLE_RTTI)
- if (LIBCXX_TARGETING_CLANG_CL OR LIBCXX_TARGETING_MSVC)
+ if (MSVC)
target_add_compile_flags_if_supported(${target} PUBLIC -GR-)
else()
target_add_compile_flags_if_supported(${target} PUBLIC -fno-rtti)
@@ -592,7 +589,7 @@
define_if(LIBCXX_DEBUG_BUILD -D_DEBUG)
if (LIBCXX_ENABLE_ASSERTIONS AND NOT LIBCXX_DEBUG_BUILD)
# MSVC doesn't like _DEBUG on release builds. See PR 4379.
- define_if_not(LIBCXX_TARGETING_MSVC -D_DEBUG)
+ define_if_not(MSVC -D_DEBUG)
endif()
# Modules flags ===============================================================
@@ -713,7 +710,7 @@
target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
endif()
- if (LIBCXX_TARGETING_MSVC)
+ if (MSVC)
if (LIBCXX_DEBUG_BUILD)
set(LIB_SUFFIX "d")
else()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154698.538055.patch
Type: text/x-patch
Size: 1718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230707/c2ae3a4c/attachment.bin>
More information about the libcxx-commits
mailing list