Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, what is putting these tools on PATH? Is this mostly for directly calling them in ad-hoc scripts of various kinds? I'm wondering if we should be employing wrapper binaries, similar to https://github.com/rust-lang/rust/blob/main/src/tools/lld-wrapper/src/main.rs, which setup PATH appropriately?
I guess for llvm-tools we'd need a bunch of those wrappers which doesn't seem amazing.
I think I'm OK with this overall, it's a bit annoying and I'm not convinced the issue is a 'stable' guarantee (i.e., whether this is actually a regression or just a problem in a pseudo-unstable surface area)... but the fix seems relatively minimal, so maybe it's the right thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK https://crates.io/crates/cargo-binutils is the only way to use them beside calling them manually.
Technically that would work but given the number of binaries it doesn't seem feasible. Note that currently
rust-lldbinary which is called by ourlld-wrappersis also affected, unless called by rustc which adds$SYSROOT/binto the PATH.LLVM tools component is hard to quantify whether it's stable or not. IIRC it was accidentally stabilised and just left that way.
Given the pain DLLs are when dealing with I wish we could just make it required to use the patterns: