Skip to content

Commit

Permalink
Auto merge of rust-lang#79608 - alessandrod:bpf, r=nagisa
Browse files Browse the repository at this point in the history
BPF target support

This adds `bpfel-unknown-none` and `bpfeb-unknown-none`, two new no_std targets that generate little and big endian BPF. The approach taken is very similar to the cuda target, where `TargetOptions::obj_is_bitcode` is enabled and code generation is done by the linker.

I added the targets to `dist-various-2`. There are [some tests](https://github.com/alessandrod/bpf-linker/tree/main/tests/assembly) in bpf-linker and I'm planning to add more. Those are currently not ran as part of rust CI.
  • Loading branch information
bors committed Jun 6, 2021
2 parents d8d6a5a + 64e08e6 commit d7db869
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/toolchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) {
LinkerFlavor::Msvc => "link.exe",
LinkerFlavor::Lld(_) => "lld",
LinkerFlavor::PtxLinker => "rust-ptx-linker",
LinkerFlavor::BpfLinker => "bpf-linker",
}),
flavor,
)),
Expand Down

0 comments on commit d7db869

Please sign in to comment.