For testing purposes, libbpf-rs also maintains a build script that can be used to generate files necessary for running the test suite. Port over commit 704543e256db ("Use runtime CARGO_CFG_TARGET_ARCH in build-script") as well as commit abc9eeb56fd7 ("Fix __TARGET_ARCH_xx define for riscv64,loongarch64,sparc64,mips64") from libbpf-cargo to libbpf-rs' build script.
For testing purposes, libbpf-rs also maintains a build script that can be used to generate files necessary for running the test suite. Port over commit 704543e256db ("Use runtime CARGO_CFG_TARGET_ARCH in build-script") as well as commit abc9eeb56fd7 ("Fix __TARGET_ARCH_xx define for riscv64,loongarch64,sparc64,mips64") from libbpf-cargo to libbpf-rs' build script.