Skip to content

Commit

Permalink
#1900 enhance the build
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Jan 8, 2025
1 parent ee3f4b2 commit 26fc035
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/setup-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand All @@ -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" )
Expand Down
6 changes: 3 additions & 3 deletions deps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
Expand Down

0 comments on commit 26fc035

Please sign in to comment.