Introduce MSW ARM64 support

This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
This commit is contained in:
Vadim Zeitlin
2018-09-17 22:34:32 +02:00
parent e29f8fdf03
commit f69dbaa1ae
127 changed files with 1456 additions and 5 deletions

View File

@@ -37,6 +37,8 @@
<if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORM=='win64'">_x64</if>
<if cond="TARGET_CPU=='amd64'">_x64</if>
<if cond="TARGET_CPU=='AMD64'">_x64</if>
<if cond="TARGET_CPU=='arm64'">_arm64</if>
<if cond="TARGET_CPU=='ARM64'">_arm64</if>
<if cond="TARGET_CPU=='ia64'">_ia64</if>
<if cond="TARGET_CPU=='IA64'">_ia64</if>
<if cond="TARGET_CPU=='x64'">_x64</if>
@@ -314,6 +316,8 @@
<set var="LINK_TARGET_CPU">
<if cond="TARGET_CPU=='amd64'">/MACHINE:X64</if>
<if cond="TARGET_CPU=='AMD64'">/MACHINE:X64</if>
<if cond="TARGET_CPU=='arm64'">/MACHINE:ARM64</if>
<if cond="TARGET_CPU=='ARM64'">/MACHINE:ARM64</if>
<if cond="TARGET_CPU=='ia64'">/MACHINE:IA64</if>
<if cond="TARGET_CPU=='IA64'">/MACHINE:IA64</if>
<if cond="TARGET_CPU=='x64'">/MACHINE:X64</if>

View File

@@ -128,7 +128,7 @@ your environment is set up appropriately with the correct compiler in the
PATH. Rather it affects some options passed to some of the common build
utilities such as the resource compiler and the linker.
Accepted values: IA64, X64
Accepted values: IA64, X64, ARM64
(AMD64 accepted as synonym for X64 but should not be used any more).
</description>
</option>

View File

@@ -52,7 +52,7 @@ BUILD = debug
# PATH. Rather it affects some options passed to some of the common build
# utilities such as the resource compiler and the linker.
#
# Accepted values: IA64, X64
# Accepted values: IA64, X64, ARM64
# (AMD64 accepted as synonym for X64 but should not be used any more).
TARGET_CPU = $(CPU)

View File

@@ -1783,6 +1783,9 @@ BUILD_CFG_FILE = $(SETUPHDIR)\build.cfg
!if "$(TARGET_CPU)" == "AMD64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "ARM64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "IA64"
ARCH_SUFFIX = _ia64
!endif
@@ -1792,6 +1795,9 @@ ARCH_SUFFIX = _x64
!if "$(TARGET_CPU)" == "amd64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "arm64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "ia64"
ARCH_SUFFIX = _ia64
!endif
@@ -1843,6 +1849,9 @@ LIBTYPE_SUFFIX = dll
!if "$(TARGET_CPU)" == "AMD64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "ARM64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "IA64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
@@ -1852,6 +1861,9 @@ LINK_TARGET_CPU = /MACHINE:X64
!if "$(TARGET_CPU)" == "amd64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "arm64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "ia64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif

View File

@@ -16,6 +16,9 @@
<PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='x64'">
<wxArchSuffix>_x64</wxArchSuffix>
</PropertyGroup>
<PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='ARM64'">
<wxArchSuffix>_arm64</wxArchSuffix>
</PropertyGroup>
<PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='Itanium'">
<wxArchSuffix>_ia64</wxArchSuffix>
</PropertyGroup>