diff --git a/test/integration-test/build.rs b/test/integration-test/build.rs index fec40483..1aee5fea 100644 --- a/test/integration-test/build.rs +++ b/test/integration-test/build.rs @@ -107,7 +107,7 @@ fn main() { } else if arch == "aarch64" { target_arch.push("arm64"); } else { - target_arch.push(arch); + target_arch.push(&arch); }; // NB: libbpf's documentation suggests that vmlinux.h be generated by running `bpftool btf @@ -198,6 +198,8 @@ fn main() { &target, ]); + cmd.env("CARGO_CFG_BPF_TARGET_ARCH", arch); + // Workaround to make sure that the rust-toolchain.toml is respected. for key in ["RUSTUP_TOOLCHAIN", "RUSTC"] { cmd.env_remove(key);