Skip to content

Commit b8789bd

Browse files
committed
Add Windows on ARM build
1 parent a7f37cc commit b8789bd

4 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Set-up LDC to target Windows aarch64
2+
description: Adds a working aarch64-windows-msvc target to LDC.
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Install Clang
8+
shell: bash
9+
run: sudo apt-get install -y clang lld 7zip
10+
11+
- name: Set-up Windows cross-compilation
12+
shell: bash --noprofile --norc -e {0}
13+
run: |
14+
mkdir -p $HOME/.ldc/
15+
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
16+
cat << EOF | tee $HOME/.ldc/ldc2.conf
17+
"(aarch|arm)64-.*-windows-msvc":
18+
{
19+
// default switches injected before all explicit command-line switches
20+
switches = [
21+
"-defaultlib=phobos2-ldc,druntime-ldc",
22+
];
23+
// default switches appended after all explicit command-line switches
24+
post-switches = [
25+
"-I$HOME/ldc2-$LDC_VERSION-windows-multilib/import",
26+
];
27+
// default directories to be searched for libraries when linking
28+
lib-dirs = [
29+
"$HOME/ldc2-$LDC_VERSION-windows-multilib/libarm64",
30+
];
31+
};
32+
EOF
33+
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-windows-multilib.7z
34+
7z x ./ldc2-$LDC_VERSION-windows-multilib.7z -o$HOME

.github/actions/target-x86_64-windows-msvc/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Set-up LDC to target Windows
1+
name: Set-up LDC to target Windows x86_64
22
description: Adds a working x86_64-windows-msvc target to LDC.
33

44
runs:

.github/workflows/build-cli.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
- triple: 'x86_64-windows-msvc'
2121
target: 'windows'
2222

23+
- triple: 'aarch64-windows-msvc'
24+
target: 'windows'
25+
2326
- triple: 'x86_64-apple-darwin'
2427
target: 'macos'
2528

dub.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@
3333
},
3434

3535
"subConfigurations": {
36+
"botan": "pubkey",
3637
"provision": "libplist"
3738
},
3839

40+
"versions": [
41+
"AEAD_GCM", "CTR_BE", "X931_RNG", "PBKDF2", "PBKDF1", "HMAC_DRBG"
42+
],
43+
3944
"subPackages": [
4045
"frontends/cli",
4146
"frontends/dlangui",

0 commit comments

Comments
 (0)