Skip to content

Commit

Permalink
internal fix: Use Windows-aarch64 target name and compiler options (#518
Browse files Browse the repository at this point in the history
)

* internal fix: Use Windows-aarch64 target name

* Fix compiler

* Fix strip command

* Use the same compiler flags with other Windows
  • Loading branch information
xerial committed Sep 26, 2023
1 parent 3c67a7b commit e6d1196
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ freebsd64:
$(MAKE) native OS_NAME=FreeBSD OS_ARCH=x86_64

# For ARM
native-arm: linux-arm64 linux-android-arm linux-android-aarch64 linux-arm linux-armv6 linux-armv7 windows-arm64
native-arm: linux-arm64 linux-android-arm linux-android-aarch64 linux-arm linux-armv6 linux-armv7 windows-aarch64


# TODO: CROSS_PREFIX can be replaced with ${CROSS_ROOT}/bin/${CROSS_TRIPLE}- in Makefile.common
Expand Down Expand Up @@ -237,9 +237,8 @@ linux-riscv64: jni-header
linux-s390x: jni-header
./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'

windows-arm64: jni-header
chmod +x ./docker/dockcross-windows-arm64
./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'
windows-aarch64: jni-header
./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'

javadoc:
$(SBT) doc
Expand Down
12 changes: 6 additions & 6 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ endif
# os=Default is meant to be generic unix/linux

# To support new CPU architecture, add a new target name here
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
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
os_arch := $(OS_NAME)-$(OS_ARCH)
IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7"))

Expand Down Expand Up @@ -304,11 +304,11 @@ Linux-riscv64_LINKFLAGS := -shared -static-libgcc -static-libstdc++
Linux-riscv64_LIBNAME := libsnappyjava.so
Linux-riscv64_SNAPPY_FLAGS:=

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


CXX := $($(os_arch)_CXX)
Expand Down

0 comments on commit e6d1196

Please sign in to comment.