electron-tasje: fix arm and i686 builds

This commit is contained in:
Duncaen 2025-07-19 18:51:24 +02:00
parent e339607f50
commit 84e56dac1a
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35

View file

@ -0,0 +1,38 @@
From effac118bafb18e33ecde9a60721045609381a76 Mon Sep 17 00:00:00 2001
From: LN Liberda <lauren@selfisekai.rocks>
Date: Tue, 19 Nov 2024 23:08:50 +0100
Subject: [PATCH] fix invalid target-gated code
---
src/environment.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/environment.rs b/src/environment.rs
index 4ef5059..7eebf42 100644
--- a/src/environment.rs
+++ b/src/environment.rs
@@ -44,13 +44,13 @@ impl Architecture {
#[cfg(target_arch = "x86_64")]
pub static HOST_ARCHITECTURE: Architecture = Architecture::X86_64;
-#[cfg(any(target_arch = "i586", target_arch = "i686"))]
+#[cfg(target_arch = "x86")]
pub static HOST_ARCHITECTURE: Architecture = Architecture::X86;
#[cfg(target_arch = "aarch64")]
pub static HOST_ARCHITECTURE: Architecture = Architecture::Aarch64;
-#[cfg(any(target_arch = "armv6", target_arch = "armv7"))]
+#[cfg(target_arch = "arm")]
pub static HOST_ARCHITECTURE: Architecture = Architecture::ArmV7;
#[non_exhaustive]
@@ -91,7 +91,7 @@ pub static HOST_PLATFORM: Platform = Platform::Linux;
#[cfg(target_os = "windows")]
pub static HOST_PLATFORM: Platform = Platform::Windows;
-#[cfg(target_os = "darwin")]
+#[cfg(target_os = "macos")]
pub static HOST_PLATFORM: Platform = Platform::Darwin;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]