@@ -8,7 +8,7 @@ use std::{io, path::Path};
88
99#[ cfg( target_os = "linux" ) ]
1010use fspy_seccomp_unotify:: supervisor:: supervise;
11- #[ cfg( not( target_env = "musl" ) ) ]
11+ #[ cfg( all ( not( target_os = "android" ) , not ( target_env = "musl" ) ) ) ]
1212use fspy_shared:: ipc:: NativeStr ;
1313use fspy_shared:: ipc:: { PathAccess , channel:: channel} ;
1414#[ cfg( target_os = "macos" ) ]
@@ -36,20 +36,22 @@ pub struct SpyImpl {
3636 #[ cfg( target_os = "macos" ) ]
3737 artifacts : Artifacts ,
3838
39- #[ cfg( not( target_env = "musl" ) ) ]
39+ #[ cfg( all ( not( target_os = "android" ) , not ( target_env = "musl" ) ) ) ]
4040 preload_path : Box < NativeStr > ,
4141}
4242
43- #[ cfg( not( target_env = "musl" ) ) ]
43+ #[ cfg( all ( not( target_os = "android" ) , not ( target_env = "musl" ) ) ) ]
4444const PRELOAD_CDYLIB_BINARY : & [ u8 ] = include_bytes ! ( env!( "CARGO_CDYLIB_FILE_FSPY_PRELOAD_UNIX" ) ) ;
4545
4646impl SpyImpl {
4747 /// Initialize the fs access spy by writing the preload library on disk.
4848 ///
4949 /// On musl targets, we don't build a preload library —
5050 /// only seccomp-based tracking is used.
51- pub fn init_in ( #[ cfg_attr( target_env = "musl" , allow( unused) ) ] dir : & Path ) -> io:: Result < Self > {
52- #[ cfg( not( target_env = "musl" ) ) ]
51+ pub fn init_in (
52+ #[ cfg_attr( any( target_os = "android" , target_env = "musl" ) , allow( unused) ) ] dir : & Path ,
53+ ) -> io:: Result < Self > {
54+ #[ cfg( all( not( target_os = "android" ) , not( target_env = "musl" ) ) ) ]
5355 let preload_path = {
5456 use const_format:: formatcp;
5557 use xxhash_rust:: const_xxh3:: xxh3_128;
@@ -67,7 +69,7 @@ impl SpyImpl {
6769 } ;
6870
6971 Ok ( Self {
70- #[ cfg( not( target_env = "musl" ) ) ]
72+ #[ cfg( all ( not( target_os = "android" ) , not ( target_env = "musl" ) ) ) ]
7173 preload_path,
7274 #[ cfg( target_os = "macos" ) ]
7375 artifacts : {
@@ -98,7 +100,7 @@ impl SpyImpl {
98100 #[ cfg( target_os = "macos" ) ]
99101 artifacts : self . artifacts . clone ( ) ,
100102
101- #[ cfg( not( target_env = "musl" ) ) ]
103+ #[ cfg( all ( not( target_os = "android" ) , not ( target_env = "musl" ) ) ) ]
102104 preload_path : self . preload_path . clone ( ) ,
103105
104106 #[ cfg( target_os = "linux" ) ]
0 commit comments