File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
librustc_codegen_llvm/back
librustc_codegen_ssa/back Expand file tree Collapse file tree 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(
795795 return
796796 }
797797 // 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
799799 // '\x01' here which disables LLVM's symbol mangling (e.g., no extra
800800 // underscores added in front).
801- let prefix = if cgcx. target_pointer_width == "32 " {
801+ let prefix = if cgcx. target_arch == "x86 " {
802802 "\x01 __imp__"
803803 } else {
804804 "\x01 __imp_"
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ pub struct CodegenContext<B: WriteBackendMethods> {
248248 pub tm_factory : TargetMachineFactory < B > ,
249249 pub msvc_imps_needed : bool ,
250250 pub target_pointer_width : String ,
251+ pub target_arch : String ,
251252 pub debuginfo : config:: DebugInfo ,
252253
253254 // Number of cgus excluding the allocator/metadata modules
@@ -1103,6 +1104,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
11031104 total_cgus,
11041105 msvc_imps_needed : msvc_imps_needed ( tcx) ,
11051106 target_pointer_width : tcx. sess . target . target . target_pointer_width . clone ( ) ,
1107+ target_arch : tcx. sess . target . target . arch . clone ( ) ,
11061108 debuginfo : tcx. sess . opts . debuginfo ,
11071109 assembler_cmd,
11081110 } ;
You can’t perform that action at this time.
0 commit comments