2

I have a Windows 11 for ARM device (ARM64 aka ARMv8 64-bit). I'm trying to see if it's possible to get a C++ compiler to work natively on this device. Meaning, I want the compiler to be running natively on ARM, compiling ARM software that can run on the same device I'm compiling on. I do not want to cross-compile from an x86 device to ARM.

I've been looking for information on this for awhile but I haven't found anything. I found this StackOverflow post which has a promising title but it's about compiling from an x86_64 host. All other resources I can find in a Google search are specifically about cross-compiling from an x86 host, which is not what I want, as the goal is to see if it's possible to natively develop from ARM for ARM without using an x86 device or any x86 emulation. This is possible on both macOS and Ubuntu so I am trying to see if it's possible to do on Windows.

The usual compilers I've looked into (MSVC, MinGW GCC, MinGW Clang/LLVM, and Cygwin) all seem to be x86-only. But perhaps there are some experimental builds of these that I am unaware of.

Aaron Franke
  • 3,268
  • 4
  • 31
  • 51
  • 3
    Technically this is off-topic, tool request, but I don't have the heart to downvote or close this one. Dude, I feel your pain and hope you get an answer that's not, "No." I was going to point out the MSYS folk were poking at this, but when I went looking to see how far they'd gotten... Well, you beat me there. – user4581301 Nov 28 '21 at 04:49
  • @user4581301 I don't understand how this could be considered off-topic given the precedence I've seen with other questions. Wouldn't that make lots of things under the "cross-compiling" tag also off-topic? Lots of those questions are asking for tools by asking "how do I compile for this" etc. – Aaron Franke Nov 28 '21 at 05:14
  • 1
    @user4581301 This is the correct place for questions about *software tools commonly used by programmers*. See https://stackoverflow.com/help/on-topic – Codo Nov 28 '21 at 10:05
  • 1
    @Codo we would quibble over "about" if I thought this question really didn't fit here. And that quibbling would lead to a disagreement over is "Does X exist?" a software tool request? "If yes, where can I find it?" is pretty much implied. Locking stuff up over legal technicalities is bullcrap. More important, Aaron's done his research, and at least until Windows ARM compilers become commonplace, Stack Overflow's the most logical place to look for aggregate information on the status of them. – user4581301 Nov 28 '21 at 16:22
  • Is there any update on this? Is there any C/C++ compiler that can be run natively on an Windows ARM64 host? I have a Windows for ARM on an Apple Silicon device. It would be great to have the possibility to run the compiler natively. – emirc May 19 '22 at 08:58
  • 1
    @emirc There is still no native C/C++ compiler for Windows for ARM. Here's an open issue to track this: https://developercommunity.visualstudio.com/t/Native-ARM-Support-for-Visual-Studio/1161018 – Aaron Franke May 19 '22 at 18:09
  • 3
    ARM-native Visual Studio 2022 has been announced at MS Build a couple of days ago. Preview should be arriving in a couple of weeks: https://developercommunity.visualstudio.com/t/Native-ARM-Support-for-Visual-Studio/1161018#T-N10051663 – emirc May 26 '22 at 09:04
  • Well clang and gcc can both target arm windows, and they can both compile themselves, so... this is not for the faint of heart though. – n. m. could be an AI Jun 15 '22 at 06:40

1 Answers1

2

Since yesterday - it is.

The new Visual Studio 2022 17.3 Preview 2 has all C++ tooling running natively on ARM64 Windows.

Here's the link to the 17.3 Preview 2 Release Notes:

https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes-preview#17.3.0-pre.2.0

And here's an MS blog post about the ARM64 support: https://devblogs.microsoft.com/visualstudio/arm64-visual-studio/

emirc
  • 1,948
  • 1
  • 23
  • 38
  • 1
    Microsoft is currently (March 2023) The Windows Development Kit 2023 for Windows On ARM which is an ARM based Windows 11 box. See this Microsoft article which describes both the Development Kit and the various developer software bits including Visual Studio 2022. https://learn.microsoft.com/en-us/windows/arm/dev-kit/ – Richard Chambers Mar 21 '23 at 13:38