File tree 8 files changed +15
-18
lines changed
src/tools/run-make-support/src
arguments-non-c-like-enum
c-link-to-rust-va-list-fn
8 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -525,11 +525,12 @@ macro_rules! impl_common_helpers {
525
525
/// Generic command arguments provider. Prefer specific helper methods if possible.
526
526
/// Note that for some executables, arguments might be platform specific. For C/C++
527
527
/// compilers, arguments might be platform *and* compiler specific.
528
- pub fn args<S >( & mut self , args: & [ S ] ) -> & mut Self
528
+ pub fn args<V , S >( & mut self , args: V ) -> & mut Self
529
529
where
530
+ V : AsRef <[ S ] >,
530
531
S : AsRef <:: std:: ffi:: OsStr >,
531
532
{
532
- self . cmd. args( args) ;
533
+ self . cmd. args( args. as_ref ( ) ) ;
533
534
self
534
535
}
535
536
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ pub fn main() {
10
10
cc ( ) . input ( "test.c" )
11
11
. input ( static_lib_name ( "nonclike" ) )
12
12
. out_exe ( "test" )
13
- . args ( & extra_c_flags ( ) )
14
- . args ( & extra_cxx_flags ( ) )
13
+ . args ( extra_c_flags ( ) )
14
+ . args ( extra_cxx_flags ( ) )
15
15
. inspect ( |cmd| eprintln ! ( "{cmd:?}" ) )
16
16
. run ( ) ;
17
17
run ( "test" ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use std::fs;
9
9
10
10
fn main ( ) {
11
11
rustc ( ) . input ( "foo.rs" ) . run ( ) ;
12
- cc ( ) . input ( "bar.c" ) . input ( static_lib_name ( "foo" ) ) . out_exe ( "bar" ) . args ( & extra_c_flags ( ) ) . run ( ) ;
12
+ cc ( ) . input ( "bar.c" ) . input ( static_lib_name ( "foo" ) ) . out_exe ( "bar" ) . args ( extra_c_flags ( ) ) . run ( ) ;
13
13
run ( "bar" ) ;
14
14
remove_file ( static_lib_name ( "foo" ) ) ;
15
15
run ( "bar" ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ fn main() {
12
12
cc ( ) . input ( "test.c" )
13
13
. input ( static_lib_name ( "checkrust" ) )
14
14
. out_exe ( "test" )
15
- . args ( & extra_c_flags ( ) )
15
+ . args ( extra_c_flags ( ) )
16
16
. run ( ) ;
17
17
run ( "test" ) ;
18
18
}
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ fn main() {
11
11
cc ( ) . input ( "program.c" )
12
12
. arg ( static_lib_name ( "library" ) )
13
13
. out_exe ( "program" )
14
- . args ( & extra_c_flags ( ) )
15
- . args ( & extra_cxx_flags ( ) )
14
+ . args ( extra_c_flags ( ) )
15
+ . args ( extra_cxx_flags ( ) )
16
16
. run ( ) ;
17
17
run ( & bin_name ( "program" ) ) ;
18
18
}
Original file line number Diff line number Diff line change @@ -86,12 +86,8 @@ fn main() {
86
86
}
87
87
88
88
fn check ( CheckCfg { args, contains } : CheckCfg ) {
89
- let output = rustc ( )
90
- . input ( "lib.rs" )
91
- . arg ( "-Zunstable-options" )
92
- . arg ( "--print=check-cfg" )
93
- . args ( & * args)
94
- . run ( ) ;
89
+ let output =
90
+ rustc ( ) . input ( "lib.rs" ) . arg ( "-Zunstable-options" ) . arg ( "--print=check-cfg" ) . args ( args) . run ( ) ;
95
91
96
92
let stdout = output. stdout_utf8 ( ) ;
97
93
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ fn main() {
11
11
cc ( ) . input ( "test.c" )
12
12
. arg ( & static_lib_name ( "nonclike" ) )
13
13
. out_exe ( "test" )
14
- . args ( & extra_c_flags ( ) )
15
- . args ( & extra_cxx_flags ( ) )
14
+ . args ( extra_c_flags ( ) )
15
+ . args ( extra_cxx_flags ( ) )
16
16
. run ( ) ;
17
17
run ( "test" ) ;
18
18
}
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ fn main() {
20
20
. out_exe ( & dynamic_lib_name ( "bar" ) )
21
21
. arg ( "-fPIC" )
22
22
. arg ( "-shared" )
23
- . args ( & extra_c_flags ( ) )
24
- . args ( & extra_cxx_flags ( ) )
23
+ . args ( extra_c_flags ( ) )
24
+ . args ( extra_cxx_flags ( ) )
25
25
. run ( ) ;
26
26
llvm_readobj ( )
27
27
. input ( dynamic_lib_name ( "bar" ) )
You can’t perform that action at this time.
0 commit comments