integration-test: avoid reliance on kernel headers

This should allow us to build on any system.
reviewable/pr638/r32
Tamir Duberstein 2 years ago
parent 53da8f3c1a
commit 3248e1ae0d
No known key found for this signature in database

@ -1,5 +1,5 @@
// clang-format off
#include <linux/bpf.h>
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
// clang-format on

@ -1,5 +1,5 @@
// clang-format off
#include <linux/bpf.h>
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
// clang-format on

@ -1,5 +1,5 @@
// clang-format off
#include <linux/bpf.h>
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
// clang-format on

@ -1,5 +1,5 @@
// clang-format off
#include <linux/bpf.h>
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_core_read.h>
// clang-format on

@ -1,5 +1,5 @@
// clang-format off
#include <linux/bpf.h>
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
// clang-format on

@ -110,10 +110,15 @@ fn main() {
target_arch.push(arch);
};
let libbpf_vmlinux_dir = libbpf_dir.join(".github/actions/build-selftests");
let clang = || {
let mut cmd = Command::new("clang");
cmd.arg("-I")
cmd.arg("-nostdlibinc")
.arg("-I")
.arg(&libbpf_headers_dir)
.arg("-I")
.arg(&libbpf_vmlinux_dir)
.args(["-g", "-O2", "-target", target, "-c"])
.arg(&target_arch);
cmd

Loading…
Cancel
Save