@@ -14,13 +14,8 @@ pub(crate) fn maybe_create_entry_wrapper(
1414 is_jit : bool ,
1515 is_primary_cgu : bool ,
1616) {
17- let ( main_def_id, sigpipe) = match tcx. entry_fn ( ( ) ) {
18- Some ( ( def_id, entry_ty) ) => (
19- def_id,
20- match entry_ty {
21- EntryFnType :: Main { sigpipe } => sigpipe,
22- } ,
23- ) ,
17+ let main_def_id = match tcx. entry_fn ( ( ) ) {
18+ Some ( ( def_id, EntryFnType :: Main ) ) => def_id,
2419 None => return ,
2520 } ;
2621
@@ -33,14 +28,13 @@ pub(crate) fn maybe_create_entry_wrapper(
3328 return ;
3429 }
3530
36- create_entry_fn ( tcx, module, main_def_id, is_jit, sigpipe ) ;
31+ create_entry_fn ( tcx, module, main_def_id, is_jit) ;
3732
3833 fn create_entry_fn (
3934 tcx : TyCtxt < ' _ > ,
4035 m : & mut dyn Module ,
4136 rust_main_def_id : DefId ,
4237 ignore_lang_start_wrapper : bool ,
43- sigpipe : u8 ,
4438 ) {
4539 let main_ret_ty = tcx. fn_sig ( rust_main_def_id) . no_bound_vars ( ) . unwrap ( ) . output ( ) ;
4640 // Given that `main()` has no arguments,
@@ -91,7 +85,6 @@ pub(crate) fn maybe_create_entry_wrapper(
9185 bcx. switch_to_block ( block) ;
9286 let arg_argc = bcx. append_block_param ( block, m. target_config ( ) . pointer_type ( ) ) ;
9387 let arg_argv = bcx. append_block_param ( block, m. target_config ( ) . pointer_type ( ) ) ;
94- let arg_sigpipe = bcx. ins ( ) . iconst ( types:: I8 , sigpipe as i64 ) ;
9588
9689 let main_func_ref = m. declare_func_in_func ( main_func_id, bcx. func ) ;
9790
@@ -149,8 +142,7 @@ pub(crate) fn maybe_create_entry_wrapper(
149142 let main_val = bcx. ins ( ) . func_addr ( m. target_config ( ) . pointer_type ( ) , main_func_ref) ;
150143
151144 let func_ref = m. declare_func_in_func ( start_func_id, bcx. func ) ;
152- let call_inst =
153- bcx. ins ( ) . call ( func_ref, & [ main_val, arg_argc, arg_argv, arg_sigpipe] ) ;
145+ let call_inst = bcx. ins ( ) . call ( func_ref, & [ main_val, arg_argc, arg_argv] ) ;
154146 bcx. inst_results ( call_inst) [ 0 ]
155147 } ;
156148
0 commit comments