libbpf / libbpf-bootstrap

Scaffolding for BPF application development with libbpf and BPF CO-RE
BSD 3-Clause "New" or "Revised" License
1.1k stars 300 forks source link

examples/rust: Use `CARGO_CFG_TARGET_ARCH` environment variable #261

Closed danielocfb closed 8 months ago

danielocfb commented 8 months ago

As per #257, it appears as if std::env::consts::ARCH does not get updated to the target architecture in a cross-compilation context. Switch to using the CARGO_CFG_TARGET_ARCH environment variable in the hopes that we get the desired behavior.

anakryiko commented 8 months ago

Great, thanks for fixing!