Skip to content

dsymutil: Re-add missing -latomic #85380

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

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

maflcko
Copy link
Contributor

@maflcko maflcko commented Mar 15, 2024

This was accidentally removed in https://reviews.llvm.org/D137799#4657404 / https://reviews.llvm.org/D137799#C3933303OL44, and downstream projects are forced to add it back. For example, https://git.savannah.gnu.org/cgit/guix.git/commit/?id=4e26331a5ee87928a16888c36d51e270f0f10f90

Fix this, by re-adding it.

@llvmbot
Copy link
Member

llvmbot commented Mar 15, 2024

@llvm/pr-subscribers-debuginfo

Author: None (maflcko)

Changes

This was accidentally removed in https://reviews.llvm.org/D137799#4657404 / https://reviews.llvm.org/D137799#C3933303OL44, and downstream projects are forced to add it back. For example, https://git.savannah.gnu.org/cgit/guix.git/commit/?id=4e26331a5ee87928a16888c36d51e270f0f10f90

Fix this, by re-adding it.


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

1 Files Affected:

  • (modified) llvm/tools/dsymutil/CMakeLists.txt (+1-1)
diff --git a/llvm/tools/dsymutil/CMakeLists.txt b/llvm/tools/dsymutil/CMakeLists.txt
index 53f882e90b4e92..da371e6b728f77 100644
--- a/llvm/tools/dsymutil/CMakeLists.txt
+++ b/llvm/tools/dsymutil/CMakeLists.txt
@@ -45,4 +45,4 @@ if(APPLE AND NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
   target_link_libraries(dsymutil PRIVATE "-framework CoreFoundation")
 endif(APPLE AND NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
 
-# target_link_libraries(dsymutil PRIVATE ${LLVM_ATOMIC_LIB})
+target_link_libraries(dsymutil PRIVATE ${LLVM_ATOMIC_LIB})

@maflcko maflcko requested a review from abrachet March 18, 2024 10:10
@maflcko maflcko merged commit 23616c6 into llvm:main Apr 3, 2024
@maflcko
Copy link
Contributor Author

maflcko commented Apr 3, 2024

mbr

@maflcko maflcko deleted the 2403-dsymutil-latomic- branch April 3, 2024 17:39
Prabhuk added a commit to Prabhuk/llvm-project that referenced this pull request Apr 3, 2024
@petrhosek
Copy link
Member

This change broke our builders that use LLVM toolchain and don't have a GNU toolchain installed.

I agree that the change made in https://reviews.llvm.org/D137799 shouldn't have landed without a separate review, but this change is also incorrect because the following:

set(LLVM_ATOMIC_LIB "-latomic")
unconditionally appends -latomic which is GNU specific, compiler-rt version is called -lclang_rt.atomic, and on systems that don't have a GNU toolchain but have LLVM toolchain such as ours, it's going to result in a link failure.

Since this change also landed without a review, can you please revert it and make another PR that also fixes the logic in CheckAtomic.cmake and is reviewed and approved by build system owners?

@gulfemsavrun
Copy link
Contributor

I currently reverted the change. Let's have a more detailed discussion how we can implement this without breaking our builders as @petrhosek pointed above and the downstream projects that @maflcko mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants