File tree Expand file tree Collapse file tree 3 files changed +22
-46
lines changed
tests/run-make/incr-add-rust-src-component Expand file tree Collapse file tree 3 files changed +22
-46
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ run-make/dep-info-spaces/Makefile
99run-make/dep-info/Makefile
1010run-make/emit-to-stdout/Makefile
1111run-make/extern-fn-reachable/Makefile
12- run-make/incr-add-rust-src-component/Makefile
1312run-make/issue-84395-lto-embed-bitcode/Makefile
1413run-make/issue-88756-default-output/Makefile
1514run-make/jobserver-error/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