Skip to content

Conversation

@umarinkovic
Copy link
Contributor

Motivation

Issue: #1780

Technical Details

Test Plan

Ran the build successfully on the manylinux image using a yum installation of LLD.

Submission Checklist

@umarinkovic
Copy link
Contributor Author

I've tested this on Linux so far. I could use some input with regards to how to implement this at the subproject level. The current solution of adding therock_setup_linker.cmake file that sets up lld to all _init.cmake files feels too ad hoc, but I would also like to not have to modify every existing and future subproject declaration to have this take effect. I'm not sure if the idea is to use lld on Windows as well or not.

First off, from what I know, the amd-llvm compiler is not used in all subprojects for Windows, which is why I implemented this in the way that every subproject decides for itself dynamically at configure time whether to use lld or not. If we knew that all subprojects would use clang/llvm, we could simply mirror the linker vars from the super-project.

Secondly, I'm not sure if the idea was to first build LLD alone, then use it to link LLVM and all other sub-projects, or if the idea was to literally use a system install of LLD, perhaps modifying the docker image to come with LLD pre-installed. There's benefits and drawbacks to both approaches. On Linux I feel like it's probably easier to just use a system-install of lld, however on Windows I don't think there is such an option, so if the idea is to use lld on windows for projects where clang is the compiler, it seems to me like building a standalone LLD to be used later on is the choice to go with.

Any input is appreciated 😸

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

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

1 participant