predict use cmake -s flags rather than strip

This commit is contained in:
cjh9368 2020-04-21 16:33:58 +08:00
parent 475f62f680
commit 6c87c6c03d
2 changed files with 1 additions and 14 deletions

View File

@ -6,6 +6,7 @@ set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -s")
option(ENABLE_ASAN "Enable Google Sanitizer to find memory bugs" OFF)
option(ENABLE_PREDICT_ARM64 "predict arm64" OFF)

View File

@ -52,20 +52,6 @@ else()
target_link_libraries(mspredict pthread tvm_kernel libsecurec.a)
endif()
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
if(ENABLE_PREDICT_ARM64)
add_custom_command(TARGET mspredict POST_BUILD
COMMAND ${ANDROID_NDK}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/aarch64-linux-android/bin/strip "${PREDICT_BUILD_DIR}/src/libmspredict.so"
COMMAND ${ANDROID_NDK}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/aarch64-linux-android/bin/strip "${PREDICT_BUILD_DIR}/module/tvm_kernel/lite/libtvm_kernel.so"
)
else()
add_custom_command(TARGET mspredict POST_BUILD
COMMAND strip "${PREDICT_BUILD_DIR}/src/libmspredict.so"
COMMAND strip "${PREDICT_BUILD_DIR}/module/tvm_kernel/lite/libtvm_kernel.so"
)
endif()
endif()
add_dependencies(mspredict tvm_kernel)
add_dependencies(mspredict securec)
add_dependencies(mspredict gtest)