forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#131917 - jieyouxu:rmake-clang, r=<try>
[WIP] CI: try to drop `--test-args=clang` in `x86_64-gnu-debug` Ok what if I open a separate PR... r? `@ghost` try-job: x86_64-gnu-debug
- Loading branch information
Showing
8 changed files
with
180 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//! Smoke test to make sure the embed bitcode in elf created with | ||
//! `--plugin-opt=-lto-embed-bitcode=optimized` is valid llvm BC module. | ||
//! | ||
//! See <https://github.com/rust-lang/rust/issues/84395> where passing | ||
//! `-lto-embed-bitcode=optimized` to lld when linking rust code via `linker-plugin-lto` doesn't | ||
//! produce the expected result. | ||
//! | ||
//! See PR <https://github.com/rust-lang/rust/pull/98162> which initially introduced this test. | ||
|
||
//@ needs-force-clang-based-tests | ||
|
||
use run_make_support::{env_var, llvm_dis, llvm_objcopy, rustc}; | ||
|
||
fn main() { | ||
rustc() | ||
.input("test.rs") | ||
.arg("-Clink-arg=-fuse-ld=lld") | ||
.arg("-Clinker-plugin-lto") | ||
.arg(format!("-Clinker={}", env_var("CLANG"))) | ||
.arg("-Clink-arg=-Wl,--plugin-opt=-lto-embed-bitcode=optimized") | ||
.arg("-Zemit-thin-lto=no") | ||
.run(); | ||
|
||
llvm_objcopy().dump_section(".llvmbc", "test.bc").arg("test").run(); | ||
|
||
llvm_dis().arg("test.bc").run(); | ||
} |