Rollup merge of #110853 - tamird:compiletest-bpflinker-support, r=wesleywiser

compiletest: add bpf-linker assembly support
This commit is contained in:
Matthias Krüger 2023-04-27 21:34:16 +02:00 committed by GitHub
commit d3c43d0a22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,6 +224,7 @@ enum Emit {
Metadata,
LlvmIr,
Asm,
LinkArgsAsm,
}
impl<'test> TestCx<'test> {
@ -2035,6 +2036,9 @@ fn make_compile_args(
Emit::Asm => {
rustc.args(&["--emit", "asm"]);
}
Emit::LinkArgsAsm => {
rustc.args(&["-Clink-args=--emit=asm"]);
}
}
if !is_rustdoc {
@ -2328,6 +2332,10 @@ fn compile_test_and_save_assembly(&self) -> (ProcRes, PathBuf) {
emit = Emit::Asm;
}
Some("bpf-linker") => {
emit = Emit::LinkArgsAsm;
}
Some("ptx-linker") => {
// No extra flags needed.
}