File tree Expand file tree Collapse file tree 6 files changed +51
-61
lines changed
incr-add-rust-src-component
issue-84395-lto-embed-bitcode Expand file tree Collapse file tree 6 files changed +51
-61
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ run-make/dep-info-spaces/Makefile
77run-make/dep-info/Makefile
88run-make/emit-to-stdout/Makefile
99run-make/extern-fn-reachable/Makefile
10- run-make/incr-add-rust-src-component/Makefile
11- run-make/issue-84395-lto-embed-bitcode/Makefile
1210run-make/jobserver-error/Makefile
1311run-make/libs-through-symlinks/Makefile
1412run-make/libtest-json/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
2+ // two 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+ rfs:: remove_dir_all ( path ( & sysroot) . join ( "lib/rustlib/src/rust" ) ) ;
17+ rustc ( ) . arg ( "--sysroot" ) . arg ( & sysroot) . incremental ( "incr" ) . input ( "main.rs" ) . run ( ) ;
18+ rfs:: create_dir_all ( path ( & sysroot) . join ( "lib/rustlib/src/rust/src/libstd" ) ) ;
19+ rfs:: create_file ( path ( & sysroot) . join ( "lib/rustlib/src/rust/src/libstd/lib.rs" ) ) ;
20+ rustc ( ) . arg ( "--sysroot" ) . arg ( & sysroot) . incremental ( "incr" ) . input ( "main.rs" ) . run ( ) ;
21+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // This test checks that the embed bitcode in elf created with
2+ // lto-embed-bitcode=optimized is a valid llvm bitcode module.
3+ // Otherwise, the `test.bc` file will cause an error when
4+ // `llvm-dis` attempts to disassemble it.
5+ // See https://github.com/rust-lang/rust/issues/84395
6+
7+ //@ needs-force-clang-based-tests
8+ // NOTE(#126180): This test only runs on `x86_64-gnu-debug`, because that CI job sets
9+ // RUSTBUILD_FORCE_CLANG_BASED_TESTS and only runs tests which contain "clang" in their
10+ // name.
11+
12+ use run_make_support:: llvm:: llvm_bin_dir;
13+ use run_make_support:: { cmd, env_var, rustc} ;
14+
15+ fn main ( ) {
16+ rustc ( )
17+ . input ( "test.rs" )
18+ . link_arg ( "-fuse-ld=lld" )
19+ . arg ( "-Clinker-plugin-lto" )
20+ . linker ( & env_var ( "CLANG" ) )
21+ . link_arg ( "-Wl,--plugin-opt=-lto-embed-bitcode=optimized" )
22+ . arg ( "-Zemit-thin-lto=no" )
23+ . run ( ) ;
24+ cmd ( llvm_bin_dir ( ) . join ( "objcopy" ) )
25+ . arg ( "--dump-section" )
26+ . arg ( ".llvmbc=test.bc" )
27+ . arg ( "test" )
28+ . run ( ) ;
29+ cmd ( llvm_bin_dir ( ) . join ( "llvm-dis" ) ) . arg ( "test.bc" ) . run ( ) ;
30+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments