Add BPF target

This change adds the bpfel-unknown-none and bpfeb-unknown-none targets
which can be used to generate little endian and big endian BPF
This commit is contained in:
Alessandro Decina 2020-11-30 19:41:57 +00:00
parent 92418ce65a
commit 12e70929d6
18 changed files with 250 additions and 3 deletions

View file

@ -1835,6 +1835,7 @@ impl<'test> TestCx<'test> {
|| self.config.target.contains("nvptx")
|| self.is_vxworks_pure_static()
|| self.config.target.contains("sgx")
|| self.config.target.contains("bpf")
{
// We primarily compile all auxiliary libraries as dynamic libraries
// to avoid code size bloat and large binaries as much as possible
@ -2310,6 +2311,10 @@ impl<'test> TestCx<'test> {
// No extra flags needed.
}
Some("bpf-linker") => {
rustc.arg("-Clink-args=--emit=asm");
}
Some(_) => self.fatal("unknown 'assembly-output' header"),
None => self.fatal("missing 'assembly-output' header"),
}

View file

@ -48,6 +48,8 @@ const ARCH_TABLE: &[(&str, &str)] = &[
("armv7s", "arm"),
("asmjs", "asmjs"),
("avr", "avr"),
("bpfeb", "bpfeb"),
("bpfel", "bpfel"),
("hexagon", "hexagon"),
("i386", "x86"),
("i586", "x86"),