File tree 3 files changed +22
-46
lines changed
tests/run-make/incr-add-rust-src-component
3 files changed +22
-46
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ run-make/emit-to-stdout/Makefile
11
11
run-make/extern-fn-reachable/Makefile
12
12
run-make/foreign-double-unwind/Makefile
13
13
run-make/foreign-exceptions/Makefile
14
- run-make/incr-add-rust-src-component/Makefile
15
14
run-make/issue-36710/Makefile
16
15
run-make/issue-84395-lto-embed-bitcode/Makefile
17
16
run-make/issue-88756-default-output/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // rust-lang/rust#70924: Test that if we add rust-src component in between two
2
+ // incremental compiles, the compiler does not ICE on the second.
3
+ // Remove the rust-src part of the sysroot for the *first* build.
4
+ // Then put in a facsimile of the rust-src
5
+ // component for the second build, in order to expose the ICE from issue #70924.
6
+ // See https://github.com/rust-lang/rust/pull/72952
7
+
8
+ //FIXME(Oneirical): try on test-various and windows
9
+ //FIXME(Oneirical): check that the direct edit of the sysroot is not messing things up
10
+
11
+ use run_make_support:: { path, rfs, rustc} ;
12
+
13
+ fn main ( ) {
14
+ let sysroot = rustc ( ) . print ( "sysroot" ) . run ( ) . stdout_utf8 ( ) ;
15
+ let sysroot = sysroot. trim ( ) ;
16
+ let sysroot = format ! ( "{sysroot}-sysroot" ) ;
17
+ rfs:: remove_dir_all ( path ( & sysroot) . join ( "lib/rustlib/src/rust" ) ) ;
18
+ rustc ( ) . arg ( "--sysroot" ) . arg ( & sysroot) . incremental ( "incr" ) . input ( "main.rs" ) . run ( ) ;
19
+ rfs:: create_dir_all ( path ( & sysroot) . join ( "lib/rustlib/src/rust/src/libstd" ) ) ;
20
+ rfs:: create_file ( path ( & sysroot) . join ( "lib/rustlib/src/rust/src/libstd/lib.rs" ) ) ;
21
+ rustc ( ) . arg ( "--sysroot" ) . arg ( & sysroot) . incremental ( "incr" ) . input ( "main.rs" ) . run ( ) ;
22
+ }
You can’t perform that action at this time.
0 commit comments