From 2a5603368d659a11b39001ac12e506d47f799a42 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Mon, 27 Mar 2023 18:50:35 +0200 Subject: [PATCH 1/2] complete target detection --- crates/rattler_conda_types/src/platform.rs | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/rattler_conda_types/src/platform.rs b/crates/rattler_conda_types/src/platform.rs index 342d76265..db34f08da 100644 --- a/crates/rattler_conda_types/src/platform.rs +++ b/crates/rattler_conda_types/src/platform.rs @@ -41,6 +41,27 @@ impl Platform { #[cfg(target_arch = "x86_64")] return Platform::Linux64; + #[cfg(target_arch = "aarch64")] + return Platform::LinuxAarch64; + + #[cfg(target_arch = "arm")] + { + #[cfg(target_feature = "v7")] + return Platform::LinuxArmV7l; + + #[cfg(not(target_feature = "v7"))] + return Platform::LinuxArmV6l; + } + + #[cfg(target_arch = "powerpc64le")] + return Platform::LinuxPpc64le; + + #[cfg(target_arch = "powerpc64")] + return Platform::LinuxPpc64; + + #[cfg(target_arch = "s390x")] + return Platform::LinuxS390X; + #[cfg(target_arch = "riscv32")] return Platform::LinuxRiscv32; @@ -77,6 +98,13 @@ impl Platform { #[cfg(target_arch = "aarch64")] return Platform::OsxArm64; } + + #[cfg(target_os = "emscripten")] + { + #[cfg(target_arch = "wasm32")] + return Platform::Emscripten32; + } + #[cfg(not(any(target_os = "linux", target_os = "macos", windows)))] compile_error!("unsupported target os"); } From bc57b0c297927b3006a3031c945ebc7fb63bd2a7 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Mon, 27 Mar 2023 18:52:55 +0200 Subject: [PATCH 2/2] .. --- crates/rattler_conda_types/src/platform.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/rattler_conda_types/src/platform.rs b/crates/rattler_conda_types/src/platform.rs index db34f08da..d89d71c6d 100644 --- a/crates/rattler_conda_types/src/platform.rs +++ b/crates/rattler_conda_types/src/platform.rs @@ -72,7 +72,12 @@ impl Platform { target_arch = "x86_64", target_arch = "x86", target_arch = "riscv32", - target_arch = "riscv64" + target_arch = "riscv64", + target_arch = "aarch64", + target_arch = "arm", + target_arch = "powerpc64le", + target_arch = "powerpc64", + target_arch = "s390x" )))] compile_error!("unsupported linux architecture"); } @@ -105,7 +110,12 @@ impl Platform { return Platform::Emscripten32; } - #[cfg(not(any(target_os = "linux", target_os = "macos", windows)))] + #[cfg(not(any( + target_os = "linux", + target_os = "macos", + target_os = "emscripten", + windows + )))] compile_error!("unsupported target os"); }