Add support for Windows arm64 (#423)

This commit is contained in:
Michael Telatynski 2023-03-22 09:41:51 +00:00 committed by GitHub
parent 204945299e
commit 7a1a0fabdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 3 deletions

View file

@ -19,7 +19,7 @@ jobs:
uses: ./.github/workflows/build_windows.yaml
strategy:
matrix:
arch: [x64, x86]
arch: [x64, x86, arm64]
with:
arch: ${{ matrix.arch }}

View file

@ -14,7 +14,7 @@ on:
arch:
type: string
required: true
description: "The architecture to build for, one of 'x64' | 'x86'"
description: "The architecture to build for, one of 'x64' | 'x86' | 'arm64'"
version:
type: string
required: false
@ -45,6 +45,12 @@ jobs:
"target": "x86_64-pc-windows-msvc",
"dir": "x64"
},
"arm64": {
"target": "aarch64-pc-windows-msvc",
"build-args": "--arm64",
"arch": "amd64_arm64",
"dir": "arm64"
},
"x86": {
"target": "i686-pc-windows-msvc",
"build-args": "--ia32",
@ -69,7 +75,7 @@ jobs:
- name: Set up build tools
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ inputs.arch }}
arch: ${{ steps.config.outputs.arch || inputs.arch }}
# ActiveTCL package on choco is from 2015,
# this one is newer but includes more than we need

View file

@ -25,6 +25,7 @@ export type TargetId =
| "universal-apple-darwin"
| "i686-pc-windows-msvc"
| "x86_64-pc-windows-msvc"
| "aarch64-pc-windows-msvc"
| "i686-unknown-linux-musl"
| "i686-unknown-linux-gnu"
| "x86_64-unknown-linux-musl"
@ -98,6 +99,13 @@ const x8664PcWindowsMsvc: WindowsTarget = {
vcVarsArch: "amd64",
};
const aarch64WindowsMsvc: WindowsTarget = {
id: 'aarch64-pc-windows-msvc',
platform: 'win32',
arch: 'arm64',
vcVarsArch: 'arm64',
};
const x8664UnknownLinuxGnu: LinuxTarget = {
id: "x86_64-unknown-linux-gnu",
platform: "linux",
@ -162,6 +170,7 @@ export const TARGETS: Record<TargetId, Target> = {
// Windows
"i686-pc-windows-msvc": i686PcWindowsMsvc,
"x86_64-pc-windows-msvc": x8664PcWindowsMsvc,
'aarch64-pc-windows-msvc': aarch64WindowsMsvc,
// Linux
"i686-unknown-linux-musl": i686UnknownLinuxMusl,
"i686-unknown-linux-gnu": i686UnknownLinuxGnu,