File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed 
tests/run-make/link-args-order Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 33// checks that linker arguments remain intact and in the order they were originally passed in. 
44// See https://github.com/rust-lang/rust/pull/70665 
55
6- //@ ignore-msvc 
7- // Reason: the ld linker does not exist on Windows. 
8- 
9- use  run_make_support:: rustc; 
6+ use  run_make_support:: { is_msvc,  rustc} ; 
107
118fn  main ( )  { 
9+     let  linker = if  is_msvc ( )  {  "msvc"  }  else  {  "ld"  } ; 
10+ 
1211    rustc ( ) 
1312        . input ( "empty.rs" ) 
14-         . linker_flavor ( "ld" ) 
13+         . linker_flavor ( linker ) 
1514        . link_arg ( "a" ) 
1615        . link_args ( "b c" ) 
1716        . link_args ( "d e" ) 
@@ -20,7 +19,7 @@ fn main() {
2019        . assert_stderr_contains ( r#""a" "b" "c" "d" "e" "f""# ) ; 
2120    rustc ( ) 
2221        . input ( "empty.rs" ) 
23-         . linker_flavor ( "ld" ) 
22+         . linker_flavor ( linker ) 
2423        . arg ( "-Zpre-link-arg=a" ) 
2524        . arg ( "-Zpre-link-args=b c" ) 
2625        . arg ( "-Zpre-link-args=d e" ) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments