File tree 2 files changed +4
-2
lines changed
librustc_codegen_llvm/back
librustc_codegen_ssa/back
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -795,10 +795,10 @@ fn create_msvc_imps(
795
795
return
796
796
}
797
797
// The x86 ABI seems to require that leading underscores are added to symbol
798
- // names, so we need an extra underscore on 32-bit . There's also a leading
798
+ // names, so we need an extra underscore on x86 . There's also a leading
799
799
// '\x01' here which disables LLVM's symbol mangling (e.g., no extra
800
800
// underscores added in front).
801
- let prefix = if cgcx. target_pointer_width == "32 " {
801
+ let prefix = if cgcx. target_arch == "x86 " {
802
802
"\x01 __imp__"
803
803
} else {
804
804
"\x01 __imp_"
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ pub struct CodegenContext<B: WriteBackendMethods> {
248
248
pub tm_factory : TargetMachineFactory < B > ,
249
249
pub msvc_imps_needed : bool ,
250
250
pub target_pointer_width : String ,
251
+ pub target_arch : String ,
251
252
pub debuginfo : config:: DebugInfo ,
252
253
253
254
// Number of cgus excluding the allocator/metadata modules
@@ -1103,6 +1104,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1103
1104
total_cgus,
1104
1105
msvc_imps_needed : msvc_imps_needed ( tcx) ,
1105
1106
target_pointer_width : tcx. sess . target . target . target_pointer_width . clone ( ) ,
1107
+ target_arch : tcx. sess . target . target . arch . clone ( ) ,
1106
1108
debuginfo : tcx. sess . opts . debuginfo ,
1107
1109
assembler_cmd,
1108
1110
} ;
You can’t perform that action at this time.
0 commit comments