File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1021,12 +1021,10 @@ fn link_natively(
1021
1021
&& ( code < 1000 || code > 9999 )
1022
1022
{
1023
1023
let is_vs_installed = windows_registry:: find_vs_version ( ) . is_ok ( ) ;
1024
+ let tuple =
1025
+ sess. opts . target_triple . tuple ( ) . to_owned ( ) . replace ( "rust9x" , "pc" ) ;
1024
1026
// FIXME(cc-rs#1265) pass only target arch to find_tool()
1025
- let has_linker = windows_registry:: find_tool (
1026
- sess. opts . target_triple . tuple ( ) ,
1027
- "link.exe" ,
1028
- )
1029
- . is_some ( ) ;
1027
+ let has_linker = windows_registry:: find_tool ( & tuple, "link.exe" ) . is_some ( ) ;
1030
1028
1031
1029
sess. dcx ( ) . emit_note ( errors:: LinkExeUnexpectedError ) ;
1032
1030
if is_vs_installed && has_linker {
Original file line number Diff line number Diff line change @@ -47,8 +47,9 @@ pub(crate) fn get_linker<'a>(
47
47
self_contained : bool ,
48
48
target_cpu : & ' a str ,
49
49
) -> Box < dyn Linker + ' a > {
50
+ let tuple = sess. opts . target_triple . tuple ( ) . to_owned ( ) . replace ( "rust9x" , "pc" ) ;
50
51
// FIXME(cc-rs#1265) pass only target arch to find_tool()
51
- let msvc_tool = windows_registry:: find_tool ( sess . opts . target_triple . tuple ( ) , "link.exe" ) ;
52
+ let msvc_tool = windows_registry:: find_tool ( & tuple, "link.exe" ) ;
52
53
53
54
// If our linker looks like a batch script on Windows then to execute this
54
55
// we'll need to spawn `cmd` explicitly. This is primarily done to handle
You can’t perform that action at this time.
0 commit comments