feat add -s for Release
Some checks failed
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m5s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Successful in 1m7s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Successful in 1m9s
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 1m30s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 1m14s
linux-x64-gcc / linux-gcc (push) Failing after 1m9s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 1m12s

This commit is contained in:
tqcq 2023-12-16 01:47:47 +08:00
parent 50c854075d
commit 5d8b54be73

View File

@ -10,8 +10,11 @@ option(ULIB_SHARED_LIB "Build shared library" OFF)
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
set(MY_CMAKE_BUILD_TYPE "Release") set(CMAKE_BUILD_TYPE "Release")
# set stripped
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
endif() endif()
# add -static-libgcc and -static-libstdc++ to link flags
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if (ULIB_SHARED_LIB) if (ULIB_SHARED_LIB)