From 577fadfc100ff8fa569a34b89f5ad055ad726646 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 4 Apr 2019 20:32:24 +0200 Subject: patch 8.1.1119: no support for Windows on ARM64. Problem: No support for Windows on ARM64. Solution: Add ARM64 support (Leendert van Doorn) --- src/GvimExt/Makefile | 10 +++++++++- src/INSTALLpc.txt | 9 +++++++++ src/Make_mvc.mak | 4 ++++ src/dosinst.c | 4 +++- src/version.c | 2 ++ src/xpm/arm64/lib-vc14/libXpm.lib | Bin 0 -> 127884 bytes 6 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/xpm/arm64/lib-vc14/libXpm.lib (limited to 'src') diff --git a/src/GvimExt/Makefile b/src/GvimExt/Makefile index 27ff953e23..a865989cf7 100644 --- a/src/GvimExt/Makefile +++ b/src/GvimExt/Makefile @@ -25,6 +25,8 @@ PLATFORM = $(TARGET_CPU) ! ifdef PLATFORM ! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") CPU = AMD64 +! elseif ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") +CPU = ARM64 ! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") ! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. ! endif @@ -56,11 +58,17 @@ SUBSYSTEM = console SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) !endif +!if "$(CPU)" == "ARM64" +OFFSET = 0x11C000000 +!else +OFFSET = 0x1C000000 +!endif + all: gvimext.dll gvimext.dll: gvimext.obj \ gvimext.res - $(link) $(lflags) -dll -def:gvimext.def -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib -subsystem:$(SUBSYSTEM) + $(link) $(lflags) -dll -def:gvimext.def -base:$(OFFSET) -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib -subsystem:$(SUBSYSTEM) if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest -outputresource:$*.dll;2 gvimext.obj: gvimext.h diff --git a/src/INSTALLpc.txt b/src/INSTALLpc.txt index 634f4ad71b..4b2bd3df7c 100644 --- a/src/INSTALLpc.txt +++ b/src/INSTALLpc.txt @@ -174,6 +174,15 @@ The following Visual C++ team blog can serve as a reference page: http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx +Cross compile support for Windows on ARM64 +------------------------------------------ + +This depends on VS2017 with the optional ARM64 compiler and SDK +installed. Use "vcvarsall.bat x64_arm64" as the build environment. + +The ARM64 support was provided by Leendert van Doorn. + + OLDER VERSIONS The minimal supported version is Windows XP. Building with older compilers diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index c502dec8bf..b6a1ac0d1c 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -240,6 +240,8 @@ PLATFORM = $(TARGET_CPU) ! ifdef PLATFORM ! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") CPU = AMD64 +! elseif ("$(PLATFORM)" == "arm64") || ("$(PLATFORM)" == "ARM64") +CPU = ARM64 ! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") ! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. ! endif @@ -442,6 +444,8 @@ DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj # on the architecture. !if "$(CPU)" == "AMD64" XPM = xpm\x64 +!elseif "$(CPU)" == "ARM64" +XPM = xpm\arm64 !elseif "$(CPU)" == "i386" XPM = xpm\x86 !else diff --git a/src/dosinst.c b/src/dosinst.c index 2c05cf4c2c..ca74758e0f 100644 --- a/src/dosinst.c +++ b/src/dosinst.c @@ -1677,7 +1677,9 @@ install_registry(void) printf("Creating an uninstall entry\n"); sprintf(display_name, "Vim " VIM_VERSION_SHORT -#ifdef _WIN64 +#ifdef _M_ARM64 + " (arm64)" +#elif _M_X64 " (x64)" #endif ); diff --git a/src/version.c b/src/version.c index 14512b82ef..40d802a600 100644 --- a/src/version.c +++ b/src/version.c @@ -771,6 +771,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1119, /**/ 1118, /**/ diff --git a/src/xpm/arm64/lib-vc14/libXpm.lib b/src/xpm/arm64/lib-vc14/libXpm.lib new file mode 100644 index 0000000000..7e3e244b23 Binary files /dev/null and b/src/xpm/arm64/lib-vc14/libXpm.lib differ -- cgit v1.2.3