Compiling for ARM Windows

0

1

Microsoft have released a full version of Windows 10 for ARM Architecture, to run on Snapdragon processors.

It includes an emulation layer to run x86 binaries out of the box. However, I expect this emulation to decrease performance when compared to running software on the architecture it was compiled for.

Therefore, I wonder if it would be a good idea for users to compile software themselves for ARM, and run it directly without needing emulation. The goal of this would be to bypass the emulation layer, thus increasing performance.

This would be software many people use regularly and have the source code for, such as Chromium, Firefox, Libre Office, GIMP, Audacity, Open Shot, VLC Player, etc.

Is this doable? Will Windows 10 for ARM let one install ARM compiled binaries?

How can one go about compiling Windows software for ARM?

Revetahw says Reinstate Monica

Posted 2017-12-31T19:12:20.583

Reputation: 502

1

A simple search would have found Configure Visual C++ for ARM processors

– DavidPostill – 2017-12-31T19:21:50.983

@DavidPostill I did research this before asking, and I did not find that. – Revetahw says Reinstate Monica – 2017-12-31T19:25:21.743

It's the 3rd result (for me) for "compile windows software for arm" – DavidPostill – 2017-12-31T19:26:23.183

@DavidPostill I guess my lack of knowledge on the subject made me fail to see the relevance of that result. – Revetahw says Reinstate Monica – 2017-12-31T19:27:39.143

“Will Windows 10 for ARM let one install ARM compiled binaries?” Yes, UWP applications. – Ramhound – 2018-01-01T00:13:53.737

Answers

1

Install the Windows 10 SDK and WDK (at least Build 16299) to get the ARM Compiler for Desktop Applications.

enter image description here

Open the Project configuration and create ARM(64) configuration:

enter image description here

If you try to compile it you would get an error that ARM64 is not supported for Desktop:

enter image description here

To fix this, unload the project and open it in editor and add the line <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support> to the debug and release entry for ARM64:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v141</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
    <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v141</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
    <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
  </PropertyGroup>

and WindowsSDKDesktopARMSupport for 32Bit ARM.

Save changes, load the project again and now compilation works fine:

enter image description here

magicandre1981

Posted 2017-12-31T19:12:20.583

Reputation: 86 560

Is there an equivalent for .NET desktop development? Does .NET Framework ship on Windows 10 on ARM at all? https://docs.microsoft.com/en-us/dotnet/framework/get-started/system-requirements seems to suggest no.

– Sören Kuklau – 2018-05-31T20:21:15.437

@SörenKuklau is compiling as AnyCPU not enough? I don't have (plans to buy) an ARM64 based Laptop to test this. – magicandre1981 – 2018-06-01T13:58:23.090

It might be, but I don't even know if .NET Framework exists at all (and if so, in which version?). – Sören Kuklau – 2018-06-01T13:59:23.920

1

@SörenKuklau download the UUP script to generate an ARM64 ISO, open the Install.wim with 7Zip and look if it includes .net framework. You can also run ARM64 in a VM and test it (but it seems to be very slow).

– magicandre1981 – 2018-06-01T14:07:56.383

Oooh, I hadn't considered that I can emulate it. Thanks! – Sören Kuklau – 2018-06-01T14:15:24.420

@SörenKuklau I downloaded the latest Insider Version as ARM64 and I can see the .net framework 4 folder, so last .net 4.7.2 is integrated. – magicandre1981 – 2018-06-02T15:12:44.337