-
Notifications
You must be signed in to change notification settings - Fork 13k
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
lld fails to build on targets that need -latomic #46467
Comments
I'm trying to work out if there is a problem with LLD here, or with the command-line option that it is given. It isn't possible to work this out with the bug details, and I'm not sure anyone is going to go to the trouble to work it out from the Rust CI system. For the former it would imply that there is a dependency on libatomic encoded in the inputs that LLD is not picking up on but ld.bfd is. Perhaps we've missed a DT_NEEDED or a file masquerading as a linker script. Would it be possible to make a reproducer lld --reproduce=<file.tar> is a good way to do this although bugzilla file size limits usually mean the file has to be hosted somewhere else. |
@Peter the issue here is not LLD itself but linking LLD with ld.bfd. Since https://reviews.llvm.org/D80298 LLD fails to compile on the targets which need to link libatomic explicitly. |
My apologies, thanks for clarifying, and thanks for pointing out https://reviews.llvm.org/D80298 that makes it much clearer. Peter |
D85691 is now committed, but I think this should be included in 11.0.0 too. |
Cherry-picked to 11.x as 1708358. Thanks! |
Extended Description
In Rust CI, while trying to upgrade to LLVM 11 rc1, arm-unknown-linux-gnueabi failed to link lld due to missing symbols for Timer.cpp:
rust-lang/rust#73526 (comment)
This can be solved by linking libatomic on targets that need it. I've tried to add this in https://reviews.llvm.org/D85691, but it seems that the use of atomics for Timer at all is controversial.
The text was updated successfully, but these errors were encountered: