-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Closed
Copy link
Labels
P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
In our environment we end up setting -Clinker to a script called ld.sh; this script is implemented in terms of gcc as rustc used to expect. Now it treats it as a direct invocation of ld.
This was introduced in #52101.
I think rather than inferring the linker flavor from the name of the executable, rustc should either:
- invoke the binary with --version to try to work out what its dealing with, and/or
- have a stable
-Clinker-flavoroption to set it explicitly
There's an unstable -Zlinker-flavor option, which I think should have been stabilized at the same time as flavor inference. Ideally inference should be opt-in with -Clinker-flavor=infer, with the default being the old default of -Clinker-flavor=gcc (at least for Linux platforms).
swolchok
Metadata
Metadata
Labels
P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.