File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11use std:: env;
2- use std:: env:: consts:: ARCH ;
32use std:: path:: Path ;
43use std:: path:: PathBuf ;
54
@@ -12,18 +11,21 @@ fn main() {
1211 PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . expect ( "OUT_DIR must be set in build script" ) ) ;
1312 out. push ( "profile.skel.rs" ) ;
1413
14+ let arch = env:: var ( "CARGO_CFG_TARGET_ARCH" )
15+ . expect ( "CARGO_CFG_TARGET_ARCH must be set in build script" ) ;
16+
1517 SkeletonBuilder :: new ( )
1618 . source ( SRC )
1719 . clang_args ( format ! (
1820 "-I{}" ,
1921 Path :: new( "../../../vmlinux" )
20- . join( match ARCH {
22+ . join( match arch . as_ref ( ) {
2123 "aarch64" => "arm64" ,
2224 "loongarch64" => "loongarch" ,
2325 "powerpc64" => "powerpc" ,
2426 "riscv64" => "riscv" ,
2527 "x86_64" => "x86" ,
26- _ => ARCH ,
28+ _ => & arch ,
2729 } )
2830 . display( )
2931 ) )
Original file line number Diff line number Diff line change 11use std:: env;
2- use std:: env:: consts:: ARCH ;
32use std:: path:: Path ;
43use std:: path:: PathBuf ;
54
@@ -12,18 +11,21 @@ fn main() {
1211 PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . expect ( "OUT_DIR must be set in build script" ) ) ;
1312 out. push ( "tracecon.skel.rs" ) ;
1413
14+ let arch = env:: var ( "CARGO_CFG_TARGET_ARCH" )
15+ . expect ( "CARGO_CFG_TARGET_ARCH must be set in build script" ) ;
16+
1517 SkeletonBuilder :: new ( )
1618 . source ( SRC )
1719 . clang_args ( format ! (
1820 "-I{}" ,
1921 Path :: new( "../../../vmlinux" )
20- . join( match ARCH {
22+ . join( match arch . as_ref ( ) {
2123 "aarch64" => "arm64" ,
2224 "loongarch64" => "loongarch" ,
2325 "powerpc64" => "powerpc" ,
2426 "riscv64" => "riscv" ,
2527 "x86_64" => "x86" ,
26- _ => ARCH ,
28+ _ => & arch ,
2729 } )
2830 . display( )
2931 ) )
Original file line number Diff line number Diff line change 11use std:: env;
2- use std:: env:: consts:: ARCH ;
32use std:: path:: Path ;
43use std:: path:: PathBuf ;
54
@@ -12,18 +11,21 @@ fn main() {
1211 PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . expect ( "OUT_DIR must be set in build script" ) ) ;
1312 out. push ( "xdppass.skel.rs" ) ;
1413
14+ let arch = env:: var ( "CARGO_CFG_TARGET_ARCH" )
15+ . expect ( "CARGO_CFG_TARGET_ARCH must be set in build script" ) ;
16+
1517 SkeletonBuilder :: new ( )
1618 . source ( SRC )
1719 . clang_args ( format ! (
1820 "-I{}" ,
1921 Path :: new( "../../../vmlinux" )
20- . join( match ARCH {
22+ . join( match arch . as_ref ( ) {
2123 "aarch64" => "arm64" ,
2224 "loongarch64" => "loongarch" ,
2325 "powerpc64" => "powerpc" ,
2426 "riscv64" => "riscv" ,
2527 "x86_64" => "x86" ,
26- _ => ARCH ,
28+ _ => & arch ,
2729 } )
2830 . display( )
2931 ) )
You can’t perform that action at this time.
0 commit comments