From 43f6850e10dd4b1462ad4cfdb15367663a9fc394 Mon Sep 17 00:00:00 2001 From: Skycoder42 Date: Tue, 31 Dec 2024 08:59:00 +0100 Subject: [PATCH] add arm64e darwin targets --- .github/workflows/libsodium.yaml | 9 +++++ .../libsodium/platforms/darwin_target.dart | 35 ++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/libsodium.yaml b/.github/workflows/libsodium.yaml index a7677116..51af7e5d 100644 --- a/.github/workflows/libsodium.yaml +++ b/.github/workflows/libsodium.yaml @@ -57,9 +57,12 @@ jobs: - android_x86_64 - android_x86 - ios_arm64 + - ios_arm64e - ios_simulator_arm64 + - ios_simulator_arm64e - ios_simulator_x86_64 - macos_arm64 + - macos_arm64e - macos_x86_64 - windows @@ -68,12 +71,18 @@ jobs: install: gcc-aarch64-linux-gnu - platform: ios_arm64 runs-on: macos-latest + - platform: ios_arm64e + runs-on: macos-latest - platform: ios_simulator_arm64 runs-on: macos-latest + - platform: ios_simulator_arm64e + runs-on: macos-latest - platform: ios_simulator_x86_64 runs-on: macos-latest - platform: macos_arm64 runs-on: macos-latest + - platform: macos_arm64e + runs-on: macos-latest - platform: macos_x86_64 runs-on: macos-latest runs-on: ${{ matrix.runs-on || 'ubuntu-latest' }} diff --git a/packages/sodium_libs/tool/libsodium/platforms/darwin_target.dart b/packages/sodium_libs/tool/libsodium/platforms/darwin_target.dart index 7463267a..8d2dc7cb 100644 --- a/packages/sodium_libs/tool/libsodium/platforms/darwin_target.dart +++ b/packages/sodium_libs/tool/libsodium/platforms/darwin_target.dart @@ -31,18 +31,31 @@ enum DarwinPlatform { } class DarwinTarget extends PluginTarget { - static const ios = DarwinTarget( + // ignore: constant_identifier_names + static const ios_arm64 = DarwinTarget( platform: DarwinPlatform.ios, architecture: 'arm64', buildTarget: 'aarch64-apple-darwin23', ); // ignore: constant_identifier_names + static const ios_arm64e = DarwinTarget( + platform: DarwinPlatform.ios, + architecture: 'arm64e', + buildTarget: 'aarch64-apple-darwin23', + ); + // ignore: constant_identifier_names static const ios_simulator_arm64 = DarwinTarget( platform: DarwinPlatform.ios_simulator, architecture: 'arm64', buildTarget: 'aarch64-apple-darwin23', ); // ignore: constant_identifier_names + static const ios_simulator_arm64e = DarwinTarget( + platform: DarwinPlatform.ios_simulator, + architecture: 'arm64e', + buildTarget: 'aarch64-apple-darwin23', + ); + // ignore: constant_identifier_names static const ios_simulator_x86_64 = DarwinTarget( platform: DarwinPlatform.ios_simulator, architecture: 'x86_64', @@ -55,20 +68,32 @@ class DarwinTarget extends PluginTarget { buildTarget: 'aarch64-apple-darwin23', ); // ignore: constant_identifier_names + static const macos_arm64e = DarwinTarget( + platform: DarwinPlatform.macos, + architecture: 'arm64e', + buildTarget: 'aarch64-apple-darwin23', + ); + // ignore: constant_identifier_names static const macos_x86_64 = DarwinTarget( platform: DarwinPlatform.macos, architecture: 'x86_64', buildTarget: 'x86_64-apple-darwin23', ); - static const iosValues = [ios, ios_simulator_arm64, ios_simulator_x86_64]; - static const macosValues = [macos_arm64, macos_x86_64]; + static const iosValues = [ + ios_arm64, + ios_arm64e, + ios_simulator_arm64, + ios_simulator_arm64e, + ios_simulator_x86_64, + ]; + static const macosValues = [macos_arm64, macos_arm64e, macos_x86_64]; static const values = [...iosValues, ...macosValues]; // get hash: curl -sSL https://raw.githubusercontent.com/jedisct1/libsodium/refs/heads/master/dist-build/apple-xcframework.sh | b2sum - // last update: 2024-12-21 + // last update: 2024-12-31 static const _appleXcframeworkScriptHash = // ignore: lines_longer_than_80_chars - 'd972951f1c00eb4c6a2ec8bb37c0b09860b0a136dd034e084889b0f89fac520ef51808d05d098d8b9bc63d168bd145555ceda61ffda803aabe4035348ff9337d'; + '5aa4efd30f914f85da881e4cb4eeeeb8cc65864c0ecfaba854e96326e790e6151ee53f962c25532548c1f2ecbc2d9c514a4238750e74ee57c5eaee0e603bbe38'; static final _frameworkInfoPlist = '''