Skip to content

Commit 848cc9c

Browse files
committed
Add windows ARM64 builds support
1 parent d580eef commit 848cc9c

3 files changed

Lines changed: 11 additions & 33 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -300,20 +300,16 @@ jobs:
300300
arch:
301301
- x86
302302
- x64
303+
- arm64
303304
env:
304305
NO_DLL: ${{ github.event.inputs.no_dll }}
305306
BUILD_ARCH: ${{ matrix.arch }}
306-
TOOLSET: '14.39'
307307

308308
# Steps represent a sequence of tasks that will be executed as part of the job
309309
steps:
310310
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
311311
- uses: actions/checkout@v6
312312

313-
# - name: setup-msvc
314-
# shell: pwsh
315-
# run: .\1k\setup-msvc.ps1 -ver $env:TOOLSET -arch $env:BUILD_ARCH
316-
317313
- name: Build
318314
shell: pwsh
319315
run: .\build.ps1 -p win32 -a $env:BUILD_ARCH -libs '${{ github.event.inputs.libs }}'
@@ -337,17 +333,12 @@ jobs:
337333
env:
338334
NO_DLL: ${{ github.event.inputs.no_dll }}
339335
BUILD_ARCH: ${{ matrix.arch }}
340-
TOOLSET: '14.39'
341336

342337
# Steps represent a sequence of tasks that will be executed as part of the job
343338
steps:
344339
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
345340
- uses: actions/checkout@v6
346341

347-
# - name: setup-msvc
348-
# shell: pwsh
349-
# run: .\1k\setup-msvc.ps1 -ver $env:TOOLSET -arch $env:BUILD_ARCH
350-
351342
- name: Build
352343
shell: pwsh
353344
run: .\build.ps1 -p winrt -a $env:BUILD_ARCH -libs '${{ github.event.inputs.libs }}'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ for example, if you use git to clone axmol(~80MB) and run it's `setup.ps1`, then
4141
- x86_64
4242
- linux:
4343
- x86_64
44-
- arm64
44+
- arm64 (since v114)
4545
- ios:
4646
- arm64
4747
- arm64 simulator

src/openssl/build1.ps1

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,17 @@ $env:CXX = $null
1313

1414
if ($target_os.StartsWith('win')) {
1515
# require preinstalled perl interpreter: https://strawberryperl.com/releases.html
16-
if ($target_cpu -eq "x86") {
17-
if (!$is_winrt) {
18-
$TARGET_OPTIONS += 'VC-WIN32'
19-
}
20-
else {
21-
$TARGET_OPTIONS += 'VC-WIN32-UWP'
16+
switch($target_cpu) {
17+
'x86' { $ossl_cpu_opt = 'VC-WIN32' }
18+
'x64' { $ossl_cpu_opt = 'VC-WIN64A' }
19+
'arm64' { $ossl_cpu_opt = 'VC-WIN64-ARM' }
20+
default {
21+
throw "Unsupported arch: $target_cpu"
2222
}
2323
}
24-
else {
25-
if (!$is_winrt) {
26-
$TARGET_OPTIONS += 'VC-WIN64A'
27-
}
28-
else {
29-
if ($target_cpu -eq 'x64') {
30-
$TARGET_OPTIONS += 'VC-WIN64A-UWP'
31-
}
32-
elseif ($target_cpu -eq 'arm64') {
33-
$TARGET_OPTIONS += 'VC-WIN64-ARM-UWP'
34-
}
35-
else {
36-
Write-Output "Unsupported arch: $target_cpu"
37-
return 1
38-
}
39-
}
24+
25+
if ($is_winrt) {
26+
$ossl_cpu_opt += '-UWP'
4027
}
4128

4229
if ($env:NO_DLL -eq 'true') {

0 commit comments

Comments
 (0)