Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler-rt] Link atomic against builtins #65239

Merged
merged 1 commit into from
Sep 4, 2023

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
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
1 check passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants