File tree Expand file tree Collapse file tree 6 files changed +45
-3
lines changed Expand file tree Collapse file tree 6 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 11use std:: env;
2+ use std:: env:: consts:: ARCH ;
3+ use std:: path:: Path ;
24use std:: path:: PathBuf ;
35
46use libbpf_cargo:: SkeletonBuilder ;
@@ -12,6 +14,19 @@ fn main() {
1214
1315 SkeletonBuilder :: new ( )
1416 . source ( SRC )
17+ . clang_args ( format ! (
18+ "-I{}" ,
19+ Path :: new( "../../../vmlinux" )
20+ . join( match ARCH {
21+ "aarch64" => "arm64" ,
22+ "loongarch64" => "loongarch" ,
23+ "powerpc64" => "powerpc" ,
24+ "riscv64" => "riscv" ,
25+ "x86_64" => "x86" ,
26+ _ => ARCH ,
27+ } )
28+ . display( )
29+ ) )
1530 . build_and_generate ( out)
1631 . expect ( "bpf compilation failed" ) ;
1732 println ! ( "cargo:rerun-if-changed={}" , SRC ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11use std:: env;
2+ use std:: env:: consts:: ARCH ;
3+ use std:: path:: Path ;
24use std:: path:: PathBuf ;
35
46use libbpf_cargo:: SkeletonBuilder ;
@@ -12,6 +14,19 @@ fn main() {
1214
1315 SkeletonBuilder :: new ( )
1416 . source ( SRC )
17+ . clang_args ( format ! (
18+ "-I{}" ,
19+ Path :: new( "../../../vmlinux" )
20+ . join( match ARCH {
21+ "aarch64" => "arm64" ,
22+ "loongarch64" => "loongarch" ,
23+ "powerpc64" => "powerpc" ,
24+ "riscv64" => "riscv" ,
25+ "x86_64" => "x86" ,
26+ _ => ARCH ,
27+ } )
28+ . display( )
29+ ) )
1530 . build_and_generate ( & out)
1631 . expect ( "bpf compilation failed" ) ;
1732 println ! ( "cargo:rerun-if-changed={}" , SRC ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11use std:: env;
2+ use std:: env:: consts:: ARCH ;
3+ use std:: path:: Path ;
24use std:: path:: PathBuf ;
35
46use libbpf_cargo:: SkeletonBuilder ;
@@ -12,6 +14,19 @@ fn main() {
1214
1315 SkeletonBuilder :: new ( )
1416 . source ( SRC )
17+ . clang_args ( format ! (
18+ "-I{}" ,
19+ Path :: new( "../../../vmlinux" )
20+ . join( match ARCH {
21+ "aarch64" => "arm64" ,
22+ "loongarch64" => "loongarch" ,
23+ "powerpc64" => "powerpc" ,
24+ "riscv64" => "riscv" ,
25+ "x86_64" => "x86" ,
26+ _ => ARCH ,
27+ } )
28+ . display( )
29+ ) )
1530 . build_and_generate ( out)
1631 . unwrap ( ) ;
1732 println ! ( "cargo:rerun-if-changed={}" , SRC ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments