predict use cmake -s flags rather than strip
This commit is contained in:
parent
475f62f680
commit
6c87c6c03d
|
@ -6,6 +6,7 @@ set(CMAKE_BUILD_TYPE "Release")
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_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_ASAN "Enable Google Sanitizer to find memory bugs" OFF)
|
||||||
option(ENABLE_PREDICT_ARM64 "predict arm64" OFF)
|
option(ENABLE_PREDICT_ARM64 "predict arm64" OFF)
|
||||||
|
|
|
@ -52,20 +52,6 @@ else()
|
||||||
target_link_libraries(mspredict pthread tvm_kernel libsecurec.a)
|
target_link_libraries(mspredict pthread tvm_kernel libsecurec.a)
|
||||||
endif()
|
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 tvm_kernel)
|
||||||
add_dependencies(mspredict securec)
|
add_dependencies(mspredict securec)
|
||||||
add_dependencies(mspredict gtest)
|
add_dependencies(mspredict gtest)
|
||||||
|
|
Loading…
Reference in New Issue