Skip to content

Commit 48e5b5e

Browse files
authored
[libc++abi] Improve error message when libunwind is missing from LLVM_ENABLE_RUNTIMES (#77991)
This doesn't actually prevent the build from failing, but it provides a better diagnostic that explains what is needed in order to fix the build. Fixes #77846 Fixes #77843
1 parent f112caf commit 48e5b5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: libcxxabi/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ option(LIBCXXABI_ENABLE_ASSERTIONS "Enable assertions independent of build mode.
4747
option(LIBCXXABI_ENABLE_PEDANTIC "Compile with pedantic enabled." OFF)
4848
option(LIBCXXABI_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
4949
option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." ON)
50+
if (LIBCXXABI_USE_LLVM_UNWINDER AND NOT "libunwind" IN_LIST LLVM_ENABLE_RUNTIMES)
51+
message(FATAL_ERROR "LIBCXXABI_USE_LLVM_UNWINDER is set to ON, but libuwnind is not specified in LLVM_ENABLE_RUNTIMES.")
52+
endif()
5053
option(LIBCXXABI_ENABLE_STATIC_UNWINDER "Statically link the LLVM unwinder." OFF)
5154
option(LIBCXXABI_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
5255
option(LIBCXXABI_ENABLE_THREADS "Build with threads enabled" ON)

0 commit comments

Comments
 (0)