Skip to content

Commit 0f61464

Browse files
authored
If the host_env feature is enabled, then enable the _ctypes module on the Android platform. (#7402)
1 parent 61b3b4f commit 0f61464

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

crates/vm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ which = "8"
104104
errno = "0.3"
105105
widestring = { workspace = true }
106106

107-
[target.'cfg(all(any(target_os = "linux", target_os = "macos", target_os = "windows"), not(any(target_env = "musl", target_env = "sgx"))))'.dependencies]
107+
[target.'cfg(all(any(target_os = "linux", target_os = "macos", target_os = "windows", target_os = "android"), not(any(target_env = "musl", target_env = "sgx"))))'.dependencies]
108108
libffi = { workspace = true, features = ["system"] }
109109
libloading = "0.9"
110110

crates/vm/src/stdlib/mod.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ pub mod posix;
4040

4141
#[cfg(all(
4242
feature = "host_env",
43-
any(target_os = "linux", target_os = "macos", target_os = "windows"),
43+
any(
44+
target_os = "linux",
45+
target_os = "macos",
46+
target_os = "windows",
47+
target_os = "android"
48+
),
4449
not(any(target_env = "musl", target_env = "sgx"))
4550
))]
4651
mod _ctypes;
@@ -87,7 +92,12 @@ pub fn builtin_module_defs(ctx: &Context) -> Vec<&'static PyModuleDef> {
8792
_collections::module_def(ctx),
8893
#[cfg(all(
8994
feature = "host_env",
90-
any(target_os = "linux", target_os = "macos", target_os = "windows"),
95+
any(
96+
target_os = "linux",
97+
target_os = "macos",
98+
target_os = "windows",
99+
target_os = "android"
100+
),
91101
not(any(target_env = "musl", target_env = "sgx"))
92102
))]
93103
_ctypes::module_def(ctx),

0 commit comments

Comments
 (0)