17 files changed +85
-30
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,14 @@ impl Cc {
45
45
self
46
46
}
47
47
48
+ /// Adds directories to the list that the linker searches for libraries.
49
+ /// Equivalent to `-L`.
50
+ pub fn library_search_path < P : AsRef < Path > > ( & mut self , path : P ) -> & mut Self {
51
+ self . cmd . arg ( "-L" ) ;
52
+ self . cmd . arg ( path. as_ref ( ) ) ;
53
+ self
54
+ }
55
+
48
56
/// Specify `-o` or `-Fe`/`-Fo` depending on platform/compiler. This assumes that the executable
49
57
/// is under `$TMPDIR`.
50
58
pub fn out_exe ( & mut self , name : & str ) -> & mut Self {
Original file line number Diff line number Diff line change @@ -156,13 +156,20 @@ impl Rustc {
156
156
self
157
157
}
158
158
159
- /// Add a directory to the library search path. Equivalent to `-L`` in rustc.
159
+ /// Add a directory to the library search path. Equivalent to `-L` in rustc.
160
160
pub fn library_search_path < P : AsRef < Path > > ( & mut self , path : P ) -> & mut Self {
161
161
self . cmd . arg ( "-L" ) ;
162
162
self . cmd . arg ( path. as_ref ( ) ) ;
163
163
self
164
164
}
165
165
166
+ /// Override the system root. Equivalent to `--sysroot` in rustc.
167
+ pub fn sysroot < P : AsRef < Path > > ( & mut self , path : P ) -> & mut Self {
168
+ self . cmd . arg ( "--sysroot" ) ;
169
+ self . cmd . arg ( path. as_ref ( ) ) ;
170
+ self
171
+ }
172
+
166
173
/// Specify the edition year.
167
174
pub fn edition ( & mut self , edition : & str ) -> & mut Self {
168
175
self . cmd . arg ( "--edition" ) ;
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ run-make/compiler-rt-works-on-mingw/Makefile
25
25
run-make/compressed-debuginfo/Makefile
26
26
run-make/const-prop-lint/Makefile
27
27
run-make/const_fn_mir/Makefile
28
- run-make/core-no-oom-handling/Makefile
29
28
run-make/crate-data-smoke/Makefile
30
29
run-make/crate-hash-rustc-version/Makefile
31
30
run-make/crate-name-priority/Makefile
@@ -98,7 +97,6 @@ run-make/issue-15460/Makefile
98
97
run-make/issue-18943/Makefile
99
98
run-make/issue-20626/Makefile
100
99
run-make/issue-22131/Makefile
101
- run-make/issue-24445/Makefile
102
100
run-make/issue-25581/Makefile
103
101
run-make/issue-26006/Makefile
104
102
run-make/issue-26092/Makefile
@@ -109,7 +107,6 @@ run-make/issue-35164/Makefile
109
107
run-make/issue-36710/Makefile
110
108
run-make/issue-37839/Makefile
111
109
run-make/issue-37893/Makefile
112
- run-make/issue-38237/Makefile
113
110
run-make/issue-40535/Makefile
114
111
run-make/issue-47384/Makefile
115
112
run-make/issue-47551/Makefile
Original file line number Diff line number Diff line change 1
- // This test checks that alloc can still compile correctly
1
+ // This test checks that alloc can still compile successfully
2
2
// when the unstable no_global_oom_handling feature is turned on.
3
3
// See https://github.com/rust-lang/rust/pull/84266
4
4
Original file line number Diff line number Diff line change 1
- // This test checks that alloc can still compile correctly
1
+ // This test checks that alloc can still compile successfully
2
2
// when the unstable no_rc feature is turned on.
3
3
// See https://github.com/rust-lang/rust/pull/84266
4
4
Original file line number Diff line number Diff line change 1
- // This test checks that alloc can still compile correctly
1
+ // This test checks that alloc can still compile successfully
2
2
// when the unstable no_sync feature is turned on.
3
3
// See https://github.com/rust-lang/rust/pull/84266
4
4
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // This test checks that the core library can still compile successfully
2
+ // when the no_global_oom_handling feature is turned on.
3
+ // See https://github.com/rust-lang/rust/pull/110649
4
+
5
+ use run_make_support:: { rustc, tmp_dir} ;
6
+
7
+ fn main ( ) {
8
+ rustc ( )
9
+ . edition ( "2021" )
10
+ . arg ( "-Dwarnings" )
11
+ . crate_type ( "rlib" )
12
+ . input ( "../../../library/core/src/lib.rs" )
13
+ . sysroot ( tmp_dir ( ) . join ( "fakeroot" ) )
14
+ . cfg ( "no_global_oom_handling" )
15
+ . run ( ) ;
16
+ }
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ // A very specific set of circumstances (mainly, implementing Deref, and
2
+ // having a procedural macro and a Debug derivation in external crates) caused
3
+ // an internal compiler error (ICE) when trying to use rustdoc. This test
4
+ // reproduces the exact circumstances which caused the bug and checks
5
+ // that it does not happen again.
6
+ // See https://github.com/rust-lang/rust/issues/38237
7
+
8
+ //@ ignore-cross-compile
9
+
10
+ use run_make_support:: { rustc, rustdoc, tmp_dir} ;
11
+
12
+ fn main ( ) {
13
+ rustc ( ) . input ( "foo.rs" ) . run ( ) ;
14
+ rustc ( ) . input ( "bar.rs" ) . run ( ) ;
15
+ rustdoc ( ) . input ( "baz.rs" ) . library_search_path ( tmp_dir ( ) ) . output ( tmp_dir ( ) ) . run ( ) ;
16
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ // It was once required to use a position-independent executable (PIE)
2
+ // in order to use the thread_local! macro, or some symbols would contain
3
+ // a NULL address. This was fixed, and this test checks a non-PIE, then a PIE
4
+ // build to see if this bug makes a resurgence.
5
+ // See https://github.com/rust-lang/rust/pull/24448
6
+
7
+ //@ ignore-cross-compile
8
+ //@ only-linux
9
+
10
+ use run_make_support:: { cc, run, rustc, tmp_dir} ;
11
+
12
+ fn main ( ) {
13
+ rustc ( ) . input ( "foo.rs" ) . run ( ) ;
14
+ cc ( ) . input ( "foo.c" )
15
+ . arg ( "-lfoo" )
16
+ . library_search_path ( tmp_dir ( ) )
17
+ . arg ( "-Wl,--gc-sections" )
18
+ . arg ( "-lpthread" )
19
+ . arg ( "-ldl" )
20
+ . out_exe ( "foo" )
21
+ . run ( ) ;
22
+ run ( "foo" ) ;
23
+ cc ( ) . input ( "foo.c" )
24
+ . arg ( "-lfoo" )
25
+ . library_search_path ( tmp_dir ( ) )
26
+ . arg ( "-Wl,--gc-sections" )
27
+ . arg ( "-lpthread" )
28
+ . arg ( "-ldl" )
29
+ . arg ( "-pie" )
30
+ . arg ( "-fPIC" )
31
+ . out_exe ( "foo" )
32
+ . run ( ) ;
33
+ run ( "foo" ) ;
34
+ }
0 commit comments