mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
Build non-SIMD versions of Stockfish engine
Will be used for CPUs that don't support the best SIMD instructions.
This commit is contained in:
parent
bec49dc5a7
commit
105ae49b01
|
@ -78,6 +78,7 @@ preBuild.dependsOn buildEco
|
||||||
task copyToAssets(type: Copy, dependsOn: 'externalNativeBuildRelease') {
|
task copyToAssets(type: Copy, dependsOn: 'externalNativeBuildRelease') {
|
||||||
from('build/intermediates/ndkBuild/release/obj/local') {
|
from('build/intermediates/ndkBuild/release/obj/local') {
|
||||||
include '*/stockfish'
|
include '*/stockfish'
|
||||||
|
include '*/stockfish_nosimd'
|
||||||
}
|
}
|
||||||
into 'src/main/assets'
|
into 'src/main/assets'
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,20 @@ endif
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := stockfish
|
LOCAL_MODULE := stockfish
|
||||||
LOCAL_SRC_FILES := $(SF_SRC_FILES)
|
include $(LOCAL_PATH)/build_sf.mk
|
||||||
LOCAL_CFLAGS := -std=c++17 -O2 -fno-exceptions -DNNUE_EMBEDDING_OFF \
|
|
||||||
-fPIE $(MY_ARCH_DEF) -s
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
LOCAL_LDFLAGS += -fPIE -pie -s
|
MY_ARCH_DEF :=
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := stockfish_nosimd
|
||||||
|
include $(LOCAL_PATH)/build_sf.mk
|
||||||
|
stockfish : stockfish_nosimd
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||||
|
MY_ARCH_DEF :=
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := stockfish_nosimd
|
||||||
|
include $(LOCAL_PATH)/build_sf.mk
|
||||||
|
stockfish : stockfish_nosimd
|
||||||
|
endif
|
||||||
|
|
5
DroidFishApp/src/main/cpp/stockfish/build_sf.mk
Normal file
5
DroidFishApp/src/main/cpp/stockfish/build_sf.mk
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
LOCAL_SRC_FILES := $(SF_SRC_FILES)
|
||||||
|
LOCAL_CFLAGS := -std=c++17 -O2 -fno-exceptions -DNNUE_EMBEDDING_OFF \
|
||||||
|
-fPIE $(MY_ARCH_DEF) -s
|
||||||
|
LOCAL_LDFLAGS += -fPIE -pie -s
|
||||||
|
include $(BUILD_EXECUTABLE)
|
Loading…
Reference in New Issue
Block a user