Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows arm64 #624

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: ./.github/workflows/build_windows.yaml
strategy:
matrix:
arch: [x64, x86]
arch: [x64, x86, arm64]
with:
arch: ${{ matrix.arch }}

Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/build_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ jobs:
path: |
./.hak

- name: Set up build tools
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ steps.config.outputs.arch || inputs.arch }}

# ActiveTCL package on choco is from 2015,
# this one is newer but includes more than we need
- name: Choco install tclsh
Expand Down Expand Up @@ -109,6 +104,18 @@ jobs:
- name: Install Deps
run: "yarn install --frozen-lockfile"

- name: Set up sqlcipher macros
if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm')
shell: pwsh
run: |
echo "NCC=${{ github.workspace }}\scripts\cl.bat" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Set up build tools
if: steps.cache.outputs.cache-hit != 'true'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ steps.config.outputs.arch || inputs.arch }}

- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
run: |
Expand Down
6 changes: 6 additions & 0 deletions docs/windows-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ If you want to build native modules, make sure that the following tools are inst
- [Strawberry Perl](https://strawberryperl.com/)
- [Rustup](https://rustup.rs/)
- [NASM](https://www.nasm.us/)

You can install the above tools using [Chocolatey](https://chocolatey.org/install):
```cmd
choco install --no-progress -y git nodejs-lts yarn python StrawberryPerl rustup.install nasm magicsplat-tcl-tk
```

- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration:
- On the Workloads tab:
- Desktop & Mobile -> C++ build tools
Expand Down
7 changes: 7 additions & 0 deletions scripts/cl.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REM Batch file to aid in cross-compiling sqlcipher for Windows ARM64
REM Full path should be passed to Makefile.msc as NCC env var

setlocal
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VSCMD_ARG_HOST_ARCH%
cl.exe %*
endlocal