Skip to content

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Jan 12, 2024

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

@ldionne ldionne requested a review from sylvestre January 12, 2024 22:19
@ldionne ldionne requested a review from a team as a code owner January 12, 2024 22:19
@llvmbot llvmbot added the libc++abi libc++abi C++ Runtime Library. Not libc++. label Jan 12, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 12, 2024

@llvm/pr-subscribers-libcxxabi

Author: Louis Dionne (ldionne)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/77991.diff

1 Files Affected:

  • (modified) libcxxabi/CMakeLists.txt (+3)
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)

@ldionne
Copy link
Member Author

ldionne commented Jan 15, 2024

I'll merge this since this has been widely requested.

@ldionne ldionne merged commit 48e5b5e into llvm:main Jan 15, 2024
@ldionne ldionne deleted the review/better-error-cmake-unwind-missing branch January 15, 2024 15:16
@vitalybuka
Copy link
Collaborator

I guess they needs LIBCXXABI_USE_LLVM_UNWINDER is set to ON, but libuwnind is not specified in

I think patches like this needs to be landed like:
land -> revert -> fix broken bots-> start again

This brakeage is too early. Leaving bots broken for a long time will likely hide other regression, which make hard for bot maintainers to pinpoint the cause.

vitalybuka added a commit that referenced this pull request Jan 15, 2024
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Jan 16, 2024
Revert "[libc++abi] Improve error message when libunwind is missing from LLVM_ENABLE_RUNTIMES (llvm#77991)"

Change-Id: Ie6dcb219cff4beac5b6cf6d9fafc5757cc7a08e3
@ldionne
Copy link
Member Author

ldionne commented Jan 16, 2024

The only two bots I still see failing are:
clang-ppc64le-rhel
bolt-aarch64-ubuntu-clang

I already fixed the first one on llvm-zorg, and I can't find where the second one is defined, but the bot owner is aware of the problem. @vitalybuka Is there still a need to revert this?

searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Jan 16, 2024
…_ENABLE_RUNTIMES (llvm#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 llvm#77846
Fixes llvm#77843

Change-Id: I4ad40d4c7ba2472ff75bf4c20cba1f9034507a75
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
…_ENABLE_RUNTIMES (llvm#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 llvm#77846
Fixes llvm#77843
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++abi libc++abi C++ Runtime Library. Not libc++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linux s390x: fail to link with error: cannot find -lunwind_shared [libc++abi] lack of the detection of libunwind library files.
3 participants