mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Simplify the choice of --emit
mode for assembly tests
This commit is contained in:
parent
52fd998399
commit
4637630ed7
@ -1847,23 +1847,14 @@ impl<'test> TestCx<'test> {
|
|||||||
let output_file = self.get_output_file("s");
|
let output_file = self.get_output_file("s");
|
||||||
let input_file = &self.testpaths.file;
|
let input_file = &self.testpaths.file;
|
||||||
|
|
||||||
let mut emit = Emit::None;
|
// Use the `//@ assembly-output:` directive to determine how to emit assembly.
|
||||||
match self.props.assembly_output.as_ref().map(AsRef::as_ref) {
|
let emit = match self.props.assembly_output.as_deref() {
|
||||||
Some("emit-asm") => {
|
Some("emit-asm") => Emit::Asm,
|
||||||
emit = Emit::Asm;
|
Some("bpf-linker") => Emit::LinkArgsAsm,
|
||||||
}
|
Some("ptx-linker") => Emit::None, // No extra flags needed.
|
||||||
|
Some(other) => self.fatal(&format!("unknown 'assembly-output' directive: {other}")),
|
||||||
Some("bpf-linker") => {
|
None => self.fatal("missing 'assembly-output' directive"),
|
||||||
emit = Emit::LinkArgsAsm;
|
};
|
||||||
}
|
|
||||||
|
|
||||||
Some("ptx-linker") => {
|
|
||||||
// No extra flags needed.
|
|
||||||
}
|
|
||||||
|
|
||||||
Some(header) => self.fatal(&format!("unknown 'assembly-output' header: {header}")),
|
|
||||||
None => self.fatal("missing 'assembly-output' header"),
|
|
||||||
}
|
|
||||||
|
|
||||||
let rustc = self.make_compile_args(
|
let rustc = self.make_compile_args(
|
||||||
input_file,
|
input_file,
|
||||||
|
Loading…
Reference in New Issue
Block a user