Skip to content

Conversation

@petrhosek
Copy link
Member

The atomic shared library needs to be linked against builtins. The add_compiler_rt_runtime call already has DEP builtins but that only ensures that the builtins target is built before clang_rt.atomic but doesn't link against clang_rt.builtins, to do so we need to use LINK_LIBS clang_rt.builtins.

The atomic shared library needs to be linked against builtins. The `add_compiler_rt_runtime` call already has `DEP builtins` but that only ensures that the `builtins` target is built before `clang_rt.atomic` but doesn't link against `clang_rt.builtins`, to do so we need to use `LINK_LIBS clang_rt.builtins`.
@petrhosek petrhosek added cmake Build system in general and CMake in particular compiler-rt:builtins labels Sep 4, 2023
@petrhosek petrhosek requested a review from smeenai September 4, 2023 01:56
Copy link
Collaborator

@smeenai smeenai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@petrhosek petrhosek merged commit 360d677 into llvm:main Sep 4, 2023
@petrhosek petrhosek deleted the compiler-rt-atomic-link-builtins branch September 4, 2023 05:45
avillega pushed a commit to avillega/llvm-project that referenced this pull request Sep 11, 2023
The atomic shared library needs to be linked against builtins. The `add_compiler_rt_runtime` call already has `DEP builtins` but that only ensures that the `builtins` target is built before `clang_rt.atomic` but doesn't link against `clang_rt.builtins`, to do so we need to use `LINK_LIBS clang_rt.builtins`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Build system in general and CMake in particular compiler-rt:builtins

2 participants