@@ -65,7 +65,7 @@ pub(crate) fn maybe_create_entry_wrapper(
6565 returns : vec ! [ AbiParam :: new( m. target_config( ) . pointer_type( ) /*isize*/ ) ] ,
6666 call_conv : crate :: conv_to_call_conv (
6767 tcx. sess . target . options . entry_abi ,
68- CallConv :: triple_default ( m . isa ( ) . triple ( ) ) ,
68+ m . target_config ( ) . default_call_conv ,
6969 ) ,
7070 } ;
7171
@@ -75,7 +75,7 @@ pub(crate) fn maybe_create_entry_wrapper(
7575 let instance = Instance :: mono ( tcx, rust_main_def_id) . polymorphize ( tcx) ;
7676
7777 let main_name = tcx. symbol_name ( instance) . name ;
78- let main_sig = get_function_sig ( tcx, m. isa ( ) . triple ( ) , instance) ;
78+ let main_sig = get_function_sig ( tcx, m. target_config ( ) . default_call_conv , instance) ;
7979 let main_func_id = m. declare_function ( main_name, Linkage :: Import , & main_sig) . unwrap ( ) ;
8080
8181 let mut ctx = Context :: new ( ) ;
@@ -119,7 +119,7 @@ pub(crate) fn maybe_create_entry_wrapper(
119119 . polymorphize ( tcx) ;
120120
121121 let report_name = tcx. symbol_name ( report) . name ;
122- let report_sig = get_function_sig ( tcx, m. isa ( ) . triple ( ) , report) ;
122+ let report_sig = get_function_sig ( tcx, m. target_config ( ) . default_call_conv , report) ;
123123 let report_func_id =
124124 m. declare_function ( report_name, Linkage :: Import , & report_sig) . unwrap ( ) ;
125125 let report_func_ref = m. declare_func_in_func ( report_func_id, & mut bcx. func ) ;
0 commit comments