-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tracking issue for -Z linker-flavor #49794
Comments
I think I'd personally be ok avoiding an RFC on this so long as we've got a solid design. One step I'd preferrably like to see before stabilization is some documentation which rationalizes For example we may be able to avoid stabilizing |
This sound like a good step forwards. I can look into it, probably by next week. Two questions though: when you do The other question is: are there any stability guarantees around |
Heh all excellent questions! I'm detecting a trend as well with the topic :) Honestly I'm not entirely sure what to do about the stability of LLD. Today, and historically for a very long time, we have prepended the sysroot
The reason we unconditionally prepend PATH is related to MinGW and the Now we don't have to put LLD in the same location, nor do we need to give LLD similar treatment. At the time of implementing LLD support it was basically the easiest option. So another question entirely about stabilizing LLD is whether its command line options are stable. For example does LLD remove options arbitrarily? Tweak and/or making breaking changes to its interface? Today we'd inherit such breakage and expose rustc users to that possibly. As to whether we'll ever invoke LLD as a library, I sort of doubt it. I would personally prefer to do that because it's cheaper than spawning a process, but LLD is internally architected for abort-on-error from what I could tell so we wouldn't get a chance to gracefully handle failures in rustc. As a result it seems like a safe bet that we'll be using it as a binary for the forseeable future. Where that leaves us, I'm not sure. I think using a binary file name like I guess this is sort of the same bucket of all LLVM tooling. We'd love to expose it but run a high risk of causing a large amount of pain as soon as anything has a backwards-incompatible change (which everything else in LLVM seems to do fairly often). Maybe LLD isn't in this class of tools though? I think it's supposed to be a drop-in replacement for existing tools with stable interfaces, so as long as we use those stable interfaces (aka |
If we go with If the CLI of LLD changes in a future LLVM release then we can fix that transparently by having a We can't provide this kind of CLI stability for external linkers because the user can use any TL;DR I don't see much hazard in stabilizing
I have a WIP PR for this: #50359 I also think it makes sense to rename rustc's LLD to |
Heh I'm not sure I 100% agree with the rationale but I definitely agree with the conclusion :) The main part is that users can still specify custom arguments via |
From looking at cambridgeconsultants/rust-beagleboardx15-demo#1, this flag was stabilized in 9536d04, and is now |
Uh okay, closing I guess ¯\_(ツ)_/¯ |
Added in #40018
This flag changes how
rustc
invokes the linker. This is required to use LLD as a linker withtargets where e.g. gcc is the default linker.
@alexcrichton what would be the stabilization path here? Do we need an RFC? If yes, what should it
specify?
The text was updated successfully, but these errors were encountered: