File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ run-make/libtest-json/Makefile
109109run-make/libtest-junit/Makefile
110110run-make/libtest-padding/Makefile
111111run-make/libtest-thread-limit/Makefile
112- run-make/link-arg/Makefile
113112run-make/link-args-order/Makefile
114113run-make/link-cfg/Makefile
115114run-make/link-dedup/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // In 2016, the rustc flag "-C link-arg" was introduced - it can be repeatedly used
2+ // to add single arguments to the linker. This test passes 2 arguments to the linker using it,
3+ // then checks that the compiler's output contains the arguments passed to it.
4+ // This ensures that the compiler successfully parses this flag.
5+ // See https://github.com/rust-lang/rust/pull/36574
6+
7+ use run_make_support:: rustc;
8+
9+ fn main ( ) {
10+ let output = String :: from_utf8 (
11+ rustc ( )
12+ . input ( "empty.rs" )
13+ . link_arg ( "-lfoo" )
14+ . link_arg ( "-lbar" )
15+ . print ( "link-args" )
16+ . command_output ( )
17+ . stdout ,
18+ )
19+ . unwrap ( ) ;
20+ assert ! (
21+ output. contains( "lfoo" ) || output. contains( "lbar" ) ,
22+ "The output did not contain the expected \" lfoo\" or \" lbar\" strings."
23+ ) ;
24+ }
You can’t perform that action at this time.
0 commit comments