diff options
| author | Alessandro Decina <alessandro.d@gmail.com> | 2020-11-30 19:41:57 +0000 |
|---|---|---|
| committer | Alessandro Decina <alessandro.d@gmail.com> | 2021-05-23 18:03:27 +1000 |
| commit | 12e70929d66577f74cb6214bba5bf104e1f14aa2 (patch) | |
| tree | 140448195cdbf393d03330a6ee276a42b2ca8156 /src/tools/compiletest | |
| parent | 92418ce65aa9d45fd1af355136d65493254a344a (diff) | |
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
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 5 | ||||
| -rw-r--r-- | src/tools/compiletest/src/util.rs | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 54b079a3e86..f5095486d1a 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -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"), } diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs index 7dbd70948b8..238f4f7ae66 100644 --- a/src/tools/compiletest/src/util.rs +++ b/src/tools/compiletest/src/util.rs @@ -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"), |
