File tree 6 files changed +45
-3
lines changed
6 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
+ use std:: env:: consts:: ARCH ;
3
+ use std:: path:: Path ;
2
4
use std:: path:: PathBuf ;
3
5
4
6
use libbpf_cargo:: SkeletonBuilder ;
@@ -12,6 +14,19 @@ fn main() {
12
14
13
15
SkeletonBuilder :: new ( )
14
16
. 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
+ ) )
15
30
. build_and_generate ( out)
16
31
. expect ( "bpf compilation failed" ) ;
17
32
println ! ( "cargo:rerun-if-changed={}" , SRC ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
use std:: env;
2
+ use std:: env:: consts:: ARCH ;
3
+ use std:: path:: Path ;
2
4
use std:: path:: PathBuf ;
3
5
4
6
use libbpf_cargo:: SkeletonBuilder ;
@@ -12,6 +14,19 @@ fn main() {
12
14
13
15
SkeletonBuilder :: new ( )
14
16
. 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
+ ) )
15
30
. build_and_generate ( & out)
16
31
. expect ( "bpf compilation failed" ) ;
17
32
println ! ( "cargo:rerun-if-changed={}" , SRC ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
use std:: env;
2
+ use std:: env:: consts:: ARCH ;
3
+ use std:: path:: Path ;
2
4
use std:: path:: PathBuf ;
3
5
4
6
use libbpf_cargo:: SkeletonBuilder ;
@@ -12,6 +14,19 @@ fn main() {
12
14
13
15
SkeletonBuilder :: new ( )
14
16
. 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
+ ) )
15
30
. build_and_generate ( out)
16
31
. unwrap ( ) ;
17
32
println ! ( "cargo:rerun-if-changed={}" , SRC ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments