Skip to content

Commit b0b546d

Browse files
authoredDec 11, 2024··
[libc++abi] Provide an explicit error when trying to build for MSVC (#119370)
Fixes #119322
1 parent 7b2d592 commit b0b546d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎libcxxabi/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
3434
build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
3535
)
3636

37+
if (MSVC)
38+
message(FATAL_ERROR "Libc++abi can't be built for MSVC targets, and doing so is pointless anyway because such "
39+
"targets must use the MS C++ ABI, and libc++abi provides the Itanium C++ ABI.")
40+
endif()
41+
3742
#===============================================================================
3843
# Setup CMake Options
3944
#===============================================================================

‎libunwind/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
2424
include(GNUInstallDirs)
2525
include(CheckSymbolExists)
2626

27+
if (MSVC)
28+
message(FATAL_ERROR "Libunwind doesn't build for MSVC targets, and that is almost certainly not what you want to do "
29+
"anyway since libunwind is tied to the Itanium C++ ABI, and MSVC targets must use the MS C++ ABI.")
30+
endif()
31+
2732
#===============================================================================
2833
# Setup CMake Options
2934
#===============================================================================

0 commit comments

Comments
 (0)
Please sign in to comment.