提交 8dd54f9b 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!540 predict use cmake -s flags rather than strip

Merge pull request !540 from cjh9368/master
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册