Skip to content

Commit

Permalink
Rollup merge of rust-lang#110853 - tamird:compiletest-bpflinker-suppo…
Browse files Browse the repository at this point in the history
…rt, r=wesleywiser

compiletest: add bpf-linker assembly support
  • Loading branch information
matthiaskrgr authored Apr 27, 2023
2 parents 743d565 + c7e16af commit d3c43d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ enum Emit {
Metadata,
LlvmIr,
Asm,
LinkArgsAsm,
}

impl<'test> TestCx<'test> {
Expand Down Expand Up @@ -2035,6 +2036,9 @@ impl<'test> TestCx<'test> {
Emit::Asm => {
rustc.args(&["--emit", "asm"]);
}
Emit::LinkArgsAsm => {
rustc.args(&["-Clink-args=--emit=asm"]);
}
}

if !is_rustdoc {
Expand Down Expand Up @@ -2328,6 +2332,10 @@ impl<'test> TestCx<'test> {
emit = Emit::Asm;
}

Some("bpf-linker") => {
emit = Emit::LinkArgsAsm;
}

Some("ptx-linker") => {
// No extra flags needed.
}
Expand Down

0 comments on commit d3c43d0

Please sign in to comment.