Skip to content

Commit 0a2e5ac

Browse files
GulinSSTerrorJack
andcommitted
Add support for Windows Aarch64
Co-authored-by: Cheng Shao <[email protected]>
1 parent e98bc7f commit 0a2e5ac

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Cabal/src/Distribution/Compat/Environment.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ setEnv_ key value = withCWString key $ \k -> withCWString value $ \v -> do
6363
{- FOURMOLU_DISABLE -}
6464
# if defined(i386_HOST_ARCH)
6565
# define WINDOWS_CCONV stdcall
66-
# elif defined(x86_64_HOST_ARCH)
66+
# elif defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
6767
# define WINDOWS_CCONV ccall
6868
# else
6969
# error Unknown mingw32 arch

cabal-install/src/Distribution/Client/Compat/ExecutablePath.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ getExecutablePath = readSymbolicLink $ "/proc/self/exe"
123123

124124
# if defined(i386_HOST_ARCH)
125125
# define WINDOWS_CCONV stdcall
126-
# elif defined(x86_64_HOST_ARCH)
126+
# elif defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
127127
# define WINDOWS_CCONV ccall
128128
# else
129129
# error Unknown mingw32 arch

changelog.d/pr-10705

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
synopsis: 'Add support for Windows Aarch64'
3+
packages: [Cabal, cabal-install]
4+
prs: 10705
5+
---
6+
7+
Adds to preprocessor branches the option to support `aarch64_HOST_ARCH` platform on Windows Aarch64 target.
8+
`ccall` convention is used at Aarch64, same as for `x86_64_HOST_ARCH`.

0 commit comments

Comments
 (0)