diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c0e0952c1..369defe32 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -118,7 +118,7 @@ jobs: make skaled -j$(nproc) #echo "Ensure release mode skaled does not have any debug markers" cp skaled/skaled skaled/skaled-debug - strip skaled/skaled + strip --strip-all skaled/skaled cd .. - name: Configure historic state build run: | @@ -141,7 +141,7 @@ jobs: make skaled -j$(nproc) #echo "Ensure release mode skaled does not have any debug markers" cp skaled/skaled skaled/skaled-debug - strip skaled/skaled + strip --strip-all skaled/skaled cd .. - name: Build and publish container run: | diff --git a/.github/workflows/setup-build-publish.yml b/.github/workflows/setup-build-publish.yml index 1a54febd6..c71721c37 100644 --- a/.github/workflows/setup-build-publish.yml +++ b/.github/workflows/setup-build-publish.yml @@ -150,6 +150,13 @@ jobs: export CMAKE_BUILD_TYPE=$BUILD_TYPE cd build make skaled -j$(nproc) + if [[ "$BUILD_TYPE" = "Release" ]]; then + debug_wc=$(objdump -h skaled/skaled | grep -i debug | wc -l) + sym_wc=$(readelf -s skaled/skaled | wc -l) + if (( debug_wc != 0 || sym_wc > 10000 )); then + exit 1 + fi + fi cd .. - name: Build and publish container env: diff --git a/CMakeLists.txt b/CMakeLists.txt index 027d36198..1cc66d51c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,12 +18,6 @@ list( APPEND CMAKE_MODULE_PATH ${DEPS_INSTALL_ROOT}/lib/cmake ) link_directories( ${CMAKE_BINARY_DIR}/deps/lib ) # HACK for not-found -lff in testeth -if( NOT CMAKE_BUILD_TYPE MATCHES "Debug" ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic" ) - set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic" ) - set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -rdynamic" ) -endif() - option( SKALED_PROFILING "Build for profiling" OFF ) if( SKALED_PROFILING ) set( CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -pg" ) @@ -32,6 +26,8 @@ if( SKALED_PROFILING ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg" ) endif() +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s") + if( CMAKE_BUILD_TYPE STREQUAL "Release" ) set( CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -O3" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3" ) diff --git a/deps/build.sh b/deps/build.sh index 30b59ed63..0bd75bb34 100755 --- a/deps/build.sh +++ b/deps/build.sh @@ -2099,7 +2099,7 @@ then eval tar -xzf folly-from-git.tar.gz fi echo -e "${COLOR_INFO}fixing it${COLOR_DOTS}...${COLOR_RESET}" - sed -i 's/list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})/list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES} lzma)/' ./folly/CMake/folly-deps.cmake + sed -i 's/list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})/list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES} lzma)/' ./folly/CMake/folly-deps.cmake sed -i 's/google::InstallFailureFunction(abort);/google::InstallFailureFunction( reinterpret_cast < google::logging_fail_func_t > ( abort ) );/g' ./folly/folly/init/Init.cpp echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}" cd folly @@ -2123,8 +2123,8 @@ then eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}" eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}" install if [ "$DEBUG" = "0" ]; then - eval strip --strip-debug "${INSTALL_ROOT}"/lib/libfolly*.a - fi + eval strip --strip-debug "${INSTALL_ROOT}"/lib/libfolly*.a + fi cd "$SOURCES_ROOT" else echo -e "${COLOR_SUCCESS}SKIPPED${COLOR_RESET}"