Skip to content

Commit e6d1196

Browse files
authored
internal fix: Use Windows-aarch64 target name and compiler options (#518)
* internal fix: Use Windows-aarch64 target name * Fix compiler * Fix strip command * Use the same compiler flags with other Windows
1 parent 3c67a7b commit e6d1196

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Diff for: Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ freebsd64:
203203
$(MAKE) native OS_NAME=FreeBSD OS_ARCH=x86_64
204204

205205
# For ARM
206-
native-arm: linux-arm64 linux-android-arm linux-android-aarch64 linux-arm linux-armv6 linux-armv7 windows-arm64
206+
native-arm: linux-arm64 linux-android-arm linux-android-aarch64 linux-arm linux-armv6 linux-armv7 windows-aarch64
207207

208208

209209
# TODO: CROSS_PREFIX can be replaced with ${CROSS_ROOT}/bin/${CROSS_TRIPLE}- in Makefile.common
@@ -237,9 +237,8 @@ linux-riscv64: jni-header
237237
linux-s390x: jni-header
238238
./docker/dockcross-s390x -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native native CROSS_PREFIX=/usr/xcc/s390x-ibm-linux-gnu/bin/s390x-ibm-linux-gnu- OS_NAME=Linux OS_ARCH=s390x'
239239

240-
windows-arm64: jni-header
241-
chmod +x ./docker/dockcross-windows-arm64
242-
./docker/dockcross-windows-arm64 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native native CROSS_PREFIX=/usr/xcc/aarch64-w64-mingw32-cross/bin/aarch64-w64-mingw32- OS_NAME=Windows OS_ARCH=arm64'
240+
windows-aarch64: jni-header
241+
./docker/dockcross-windows-arm64 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native native CROSS_PREFIX=/usr/xcc/aarch64-w64-mingw32-cross/bin/aarch64-w64-mingw32- OS_NAME=Windows OS_ARCH=aarch64'
243242

244243
javadoc:
245244
$(SBT) doc

Diff for: Makefile.common

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ endif
5151
# os=Default is meant to be generic unix/linux
5252

5353
# To support new CPU architecture, add a new target name here
54-
known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-android-aarch64 Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 Mac-aarch64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 Linux-riscv Linux-riscv64
54+
known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-android-aarch64 Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 Mac-aarch64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 Windows-aarch64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 Linux-riscv Linux-riscv64
5555
os_arch := $(OS_NAME)-$(OS_ARCH)
5656
IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7"))
5757

@@ -304,11 +304,11 @@ Linux-riscv64_LINKFLAGS := -shared -static-libgcc -static-libstdc++
304304
Linux-riscv64_LIBNAME := libsnappyjava.so
305305
Linux-riscv64_SNAPPY_FLAGS:=
306306

307-
Windows-arm64_CXX := armv7-w64-mingw32-g++
308-
Windows-arm64_STRIP := strip -x
309-
Windows-arm64_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -march=armv8-a -fvisibility=hidden -D_WIN32 -DNOMINMAX -std=c++11
310-
Windows-arm64_LINKFLAGS := -shared -Wl,--out-implib,libsnappyjava.dll.a -Wl,--export-all-symbols
311-
Windows-arm64_LIBNAME := libsnappyjava.dll
307+
Windows-aarch64_CXX := $(CROSS_PREFIX)g++
308+
Windows-aarch64_STRIP := $(CROSS_PREFIX)strip
309+
Windows-aarch64_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -march=armv8-a -fvisibility=hidden -D_WIN32 -DNOMINMAX -std=c++11
310+
Windows-aarch64_LINKFLAGS := -Wl,--kill-at -shared -static
311+
Windows-aarch64_LIBNAME := libsnappyjava.dll
312312

313313

314314
CXX := $($(os_arch)_CXX)

0 commit comments

Comments
 (0)