libbpf / libbpf-bootstrap

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

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

Closed danielocfb closed 6 months ago

danielocfb commented 6 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 6 months ago

Great, thanks for fixing!