Skip to content

Commit

Permalink
compiletest: add bpf-linker assembly support
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Apr 26, 2023
1 parent 8763965 commit c7e16af
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 c7e16af

Please sign in to comment.