Commit d6ff46c
authored
Rollup merge of rust-lang#75548 - dancrossnyc:master, r=tmandry
librustc_metadata::locator: Properly detect file type.
Make sure to test file types against the non-canonicalized name to
avoid detecting the wrong type. Some systems save build artifacts
into associate file stores that do not preserve extensions, and
then link to those using conventionally-named symbolic links, that
are the arguments to `rustc` et al. If we canonicalize before
testing the type, we resolve the symlink, the extension is
lost and we might treat rlibs and rmetas as dylibs.
The fix is to tntroduce a temporary to hold the canonicalized name,
compare against the non-canonical name, and add a comment
explaining what's going on for the would-be mainter who sees a
potential cleanup.
Signed-off-by: Dan Cross <dcross@google.com>1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
689 | 695 | | |
690 | | - | |
| 696 | + | |
691 | 697 | | |
692 | | - | |
| 698 | + | |
693 | 699 | | |
694 | | - | |
| 700 | + | |
695 | 701 | | |
696 | 702 | | |
697 | 703 | | |
| |||
0 commit comments