bazelbuild / platforms

Constraint values for specifying platforms and toolchains
Apache License 2.0
110 stars 75 forks source link

Add `bpfbe` and `bpfle` cpu constraints #99

Open amari opened 3 months ago

amari commented 3 months ago

This patch creates two cpu constraints, enabling downstream toolchains the ability to generate eBPF bytecode.

Please note, that compiler target triples are named using bpf* instead of ebpf*.

Compiler Target Triple Notes
clang bpf
bpfbe
bpfle
Default endianess matches compiler host/"execute" target.
gcc bpf-unknown-none -mlittle-endian/-mbig-endian compiler flags. Little endian is the default.
rustc bpfbe-unknown-none
bpfle-unknown-none