[libcxx-commits] [libcxxabi] [libc++abi] Improve error message when libunwind is missing from LLVM_ENABLE_RUNTIMES (PR #77991)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 12 14:19:49 PST 2024
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/77991
None
>From 8de296484c609dd856d14e0eca91ac631c9432c7 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 12 Jan 2024 17:11:30 -0500
Subject: [PATCH] [libc++abi] Improve error message when libunwind is missing
from LLVM_ENABLE_RUNTIMES
---
libcxxabi/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index c62b05bf2feafc..9d8bfa548b0125 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -47,6 +47,9 @@ option(LIBCXXABI_ENABLE_ASSERTIONS "Enable assertions independent of build mode.
option(LIBCXXABI_ENABLE_PEDANTIC "Compile with pedantic enabled." OFF)
option(LIBCXXABI_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." ON)
+if (LIBCXXABI_USE_LLVM_UNWINDER AND NOT "libunwind" IN_LIST LLVM_ENABLE_RUNTIMES)
+ message(FATAL_ERROR "LIBCXXABI_USE_LLVM_UNWINDER is set to ON, but libuwnind is not specified in LLVM_ENABLE_RUNTIMES.")
+endif()
option(LIBCXXABI_ENABLE_STATIC_UNWINDER "Statically link the LLVM unwinder." OFF)
option(LIBCXXABI_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
option(LIBCXXABI_ENABLE_THREADS "Build with threads enabled" ON)
More information about the libcxx-commits
mailing list