File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,9 @@ fn main() {
88    let  target = builtins_configure:: Target :: from_env ( ) ; 
99    builtins_configure:: configure_f16_f128 ( & target) ; 
1010    builtins_configure:: configure_aliases ( & target) ; 
11+ 
12+     if  target. os  == "windows"  { 
13+         // Needed for using the `mainCRTStartup` entrypoint. 
14+         println ! ( "cargo::rustc-link-arg=/subsystem:console" ) ; 
15+     } 
1116} 
Original file line number Diff line number Diff line change @@ -650,12 +650,20 @@ fn something_with_a_dtor(f: &dyn Fn()) {
650650
651651#[ no_mangle]  
652652#[ cfg( not( thumb) ) ]  
653- #[ cfg( not( any( thumb) ) ) ]  
653+ #[ cfg( not( any( thumb,  windows ) ) ) ]  
654654extern  "C"  fn  main ( _argc :  core:: ffi:: c_int ,  _argv :  * const  * const  u8 )  -> core:: ffi:: c_int  { 
655655    run ( ) ; 
656656    0 
657657} 
658658
659+ #[ no_mangle]  
660+ #[ cfg( windows) ]  
661+ #[ allow( non_snake_case) ]  
662+ extern  "C"  fn  mainCRTStartup ( )  -> core:: ffi:: c_int  { 
663+     run ( ) ; 
664+     0 
665+ } 
666+ 
659667#[ no_mangle]  
660668#[ cfg( thumb) ]  
661669extern  "C"  fn  _start ( )  -> ! { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments