Build shaderc in android without debug symbols
This commit is contained in:
parent
c6dafd4b80
commit
bed0acda7a
@ -93,6 +93,13 @@ include $(PREBUILT_STATIC_LIBRARY)
|
|||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
|
||||||
|
# shaderc
|
||||||
|
LOCAL_MODULE := shaderc
|
||||||
|
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/shaderc/libshaderc/libshaderc_combined.a
|
||||||
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
|
||||||
# libsquish
|
# libsquish
|
||||||
LOCAL_MODULE := libsquish
|
LOCAL_MODULE := libsquish
|
||||||
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libsquish/libsquish.a
|
LOCAL_SRC_FILES := deps-$(TARGET_ARCH_ABI)/libsquish/libsquish.a
|
||||||
@ -182,20 +189,20 @@ LOCAL_PATH := .
|
|||||||
LOCAL_CPP_FEATURES += rtti exceptions
|
LOCAL_CPP_FEATURES += rtti exceptions
|
||||||
LOCAL_SRC_FILES := $(wildcard ../lib/graphics_engine/src/*.c) \
|
LOCAL_SRC_FILES := $(wildcard ../lib/graphics_engine/src/*.c) \
|
||||||
$(wildcard ../lib/graphics_engine/src/*.cpp)
|
$(wildcard ../lib/graphics_engine/src/*.cpp)
|
||||||
LOCAL_CFLAGS := -DENABLE_LIBASTCENC \
|
LOCAL_CFLAGS := -DENABLE_LIBASTCENC \
|
||||||
-I../lib/graphics_engine/include \
|
-I../lib/graphics_engine/include \
|
||||||
-I../lib/graphics_utils \
|
-I../lib/graphics_utils \
|
||||||
-I../lib/sdl2/include/ \
|
-I../lib/sdl2/include/ \
|
||||||
-I../lib/bullet/src/ \
|
-I../lib/bullet/src/ \
|
||||||
-I../lib/irrlicht/include/ \
|
-I../lib/irrlicht/include/ \
|
||||||
-I../lib/libsquish \
|
-I../lib/shaderc/libshaderc/include \
|
||||||
|
-I../lib/libsquish \
|
||||||
-Ideps-$(TARGET_ARCH_ABI)/astc-encoder/Source
|
-Ideps-$(TARGET_ARCH_ABI)/astc-encoder/Source
|
||||||
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
|
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
|
||||||
LOCAL_ARM_NEON := false
|
LOCAL_ARM_NEON := false
|
||||||
endif
|
endif
|
||||||
LOCAL_STATIC_LIBRARIES := shaderc libsquish libastcenc
|
LOCAL_STATIC_LIBRARIES := shaderc libsquish libastcenc
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
$(call import-module, third_party/shaderc)
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
|
||||||
|
@ -284,6 +284,28 @@ build_deps()
|
|||||||
touch "$DIRNAME/deps-$ARCH_OPTION/libvorbis.stamp"
|
touch "$DIRNAME/deps-$ARCH_OPTION/libvorbis.stamp"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Shaderc
|
||||||
|
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/shaderc.stamp" ]; then
|
||||||
|
echo "Compiling $ARCH_OPTION shaderc"
|
||||||
|
mkdir -p "$DIRNAME/deps-$ARCH_OPTION/shaderc"
|
||||||
|
cp -a -f "$DIRNAME/../lib/shaderc/"* "$DIRNAME/deps-$ARCH_OPTION/shaderc"
|
||||||
|
|
||||||
|
cd "$DIRNAME/deps-$ARCH_OPTION/shaderc"
|
||||||
|
cmake . -DCMAKE_TOOLCHAIN_FILE=../../../cmake/Toolchain-android.cmake \
|
||||||
|
-DHOST=$HOST -DARCH=$ARCH -DCMAKE_C_FLAGS="-fpic -O3" \
|
||||||
|
-DCMAKE_CXX_FLAGS="-fpic -O3" -DSHADERC_SKIP_INSTALL=1 \
|
||||||
|
-DSHADERC_SKIP_TESTS=1 -DSHADERC_SKIP_EXAMPLES=1 \
|
||||||
|
-DSPIRV_HEADERS_SKIP_INSTALL=1 -DSPIRV_HEADERS_SKIP_EXAMPLES=1 \
|
||||||
|
-DSKIP_SPIRV_TOOLS_INSTALL=1 -DSPIRV_SKIP_TESTS=1 \
|
||||||
|
-DSPIRV_SKIP_EXECUTABLES=1 -DENABLE_GLSLANG_BINARIES=0 \
|
||||||
|
-DENABLE_CTEST=0 &&
|
||||||
|
make -j $(($(nproc) + 1))
|
||||||
|
# Strip debug symbol to make app bundle smaller
|
||||||
|
llvm-strip --strip-debug "$DIRNAME/deps-$ARCH_OPTION/shaderc/libshaderc/libshaderc_combined.a"
|
||||||
|
check_error
|
||||||
|
touch "$DIRNAME/deps-$ARCH_OPTION/shaderc.stamp"
|
||||||
|
fi
|
||||||
|
|
||||||
# Libsquish
|
# Libsquish
|
||||||
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/libsquish.stamp" ]; then
|
if [ ! -f "$DIRNAME/deps-$ARCH_OPTION/libsquish.stamp" ]; then
|
||||||
echo "Compiling $ARCH_OPTION libsquish"
|
echo "Compiling $ARCH_OPTION libsquish"
|
||||||
|
Loading…
Reference in New Issue
Block a user