Skip to content

[cmake][runtimes] Add missing dependency on LLVMgold.so #94199

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
Jun 4, 2024

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Jun 3, 2024

When doing a runtimes build with LTO using ld.bfd (or ld.gold), the build starts failing with ninja 1.12, which added a new critical path scheduler. The reason is that LLVMgold.so is not available yet at the point where runtimes start being build, leading to configuration failures in the nested cmake invocation.

Fix this by adding an explicit dependency on LLVMgold.so if it is available. (It may not always be necessary, e.g. if the used linker is lld, but it would be hard to detect when exactly it may or may not be needed, so always adding the dependency is safer.)

When doing a runtimes build with LTO using ld.bfd (or ld.gold),
the build starts failing with ninja 1.12, which added a new
critical path scheduler. The reason is that LLVMgold.so is not
available yet at the point where runtimes start being build,
leading to configuration failures in the nested cmake invocation.

Fix this by adding an explicit dependency on LLVMgold.so if it
is available. (It may not always be necessary, e.g. if the used
linker is lld, but it would be hard to detect when exactly it may
or may not be needed, so always adding the dependency is safer.)
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Jun 3, 2024
@nikic nikic requested a review from jhuber6 June 4, 2024 06:35
@nikic nikic merged commit f9db0d2 into llvm:main Jun 4, 2024
9 checks passed
@nikic nikic deleted the llvm-gold-dep branch June 4, 2024 12:41
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants