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 1
1
use std:: env;
2
- use std:: env:: consts:: ARCH ;
3
2
use std:: path:: Path ;
4
3
use std:: path:: PathBuf ;
5
4
@@ -12,18 +11,21 @@ fn main() {
12
11
PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . expect ( "OUT_DIR must be set in build script" ) ) ;
13
12
out. push ( "profile.skel.rs" ) ;
14
13
14
+ let arch = env:: var ( "CARGO_CFG_TARGET_ARCH" )
15
+ . expect ( "CARGO_CFG_TARGET_ARCH must be set in build script" ) ;
16
+
15
17
SkeletonBuilder :: new ( )
16
18
. source ( SRC )
17
19
. clang_args ( format ! (
18
20
"-I{}" ,
19
21
Path :: new( "../../../vmlinux" )
20
- . join( match ARCH {
22
+ . join( match arch . as_ref ( ) {
21
23
"aarch64" => "arm64" ,
22
24
"loongarch64" => "loongarch" ,
23
25
"powerpc64" => "powerpc" ,
24
26
"riscv64" => "riscv" ,
25
27
"x86_64" => "x86" ,
26
- _ => ARCH ,
28
+ _ => & arch ,
27
29
} )
28
30
. display( )
29
31
) )
Original file line number Diff line number Diff line change 1
1
use std:: env;
2
- use std:: env:: consts:: ARCH ;
3
2
use std:: path:: Path ;
4
3
use std:: path:: PathBuf ;
5
4
@@ -12,18 +11,21 @@ fn main() {
12
11
PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . expect ( "OUT_DIR must be set in build script" ) ) ;
13
12
out. push ( "tracecon.skel.rs" ) ;
14
13
14
+ let arch = env:: var ( "CARGO_CFG_TARGET_ARCH" )
15
+ . expect ( "CARGO_CFG_TARGET_ARCH must be set in build script" ) ;
16
+
15
17
SkeletonBuilder :: new ( )
16
18
. source ( SRC )
17
19
. clang_args ( format ! (
18
20
"-I{}" ,
19
21
Path :: new( "../../../vmlinux" )
20
- . join( match ARCH {
22
+ . join( match arch . as_ref ( ) {
21
23
"aarch64" => "arm64" ,
22
24
"loongarch64" => "loongarch" ,
23
25
"powerpc64" => "powerpc" ,
24
26
"riscv64" => "riscv" ,
25
27
"x86_64" => "x86" ,
26
- _ => ARCH ,
28
+ _ => & arch ,
27
29
} )
28
30
. display( )
29
31
) )
Original file line number Diff line number Diff line change 1
1
use std:: env;
2
- use std:: env:: consts:: ARCH ;
3
2
use std:: path:: Path ;
4
3
use std:: path:: PathBuf ;
5
4
@@ -12,18 +11,21 @@ fn main() {
12
11
PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . expect ( "OUT_DIR must be set in build script" ) ) ;
13
12
out. push ( "xdppass.skel.rs" ) ;
14
13
14
+ let arch = env:: var ( "CARGO_CFG_TARGET_ARCH" )
15
+ . expect ( "CARGO_CFG_TARGET_ARCH must be set in build script" ) ;
16
+
15
17
SkeletonBuilder :: new ( )
16
18
. source ( SRC )
17
19
. clang_args ( format ! (
18
20
"-I{}" ,
19
21
Path :: new( "../../../vmlinux" )
20
- . join( match ARCH {
22
+ . join( match arch . as_ref ( ) {
21
23
"aarch64" => "arm64" ,
22
24
"loongarch64" => "loongarch" ,
23
25
"powerpc64" => "powerpc" ,
24
26
"riscv64" => "riscv" ,
25
27
"x86_64" => "x86" ,
26
- _ => ARCH ,
28
+ _ => & arch ,
27
29
} )
28
30
. display( )
29
31
) )
You can’t perform that action at this time.
0 commit comments