Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "SKALED-1900 release build with separate debug info" #2013

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/custom_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ on:
options:
- Debug
- RelWithDebInfo
- Release
default: RelWithDebInfo

jobs:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Release
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd deps
./clean.sh
rm -f ./libwebsockets-from-git.tar.gz
Expand All @@ -105,6 +105,7 @@ jobs:
export CMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p build
cd build
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE ..
cd ..
- name: Build all
Expand All @@ -115,8 +116,9 @@ jobs:
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd build
make skaled -j$(nproc)
#echo "Ensure release mode skaled does not have any debug markers"
cp skaled/skaled skaled/skaled-debug
strip --strip-all skaled/skaled
strip skaled/skaled
cd ..
- name: Configure historic state build
run: |
Expand All @@ -126,6 +128,7 @@ jobs:
export CMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p build-historic
cd build-historic
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DHISTORIC_STATE=1 ..
cd ..
- name: Build historic state version
Expand All @@ -136,8 +139,9 @@ jobs:
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd build-historic
make skaled -j$(nproc)
#echo "Ensure release mode skaled does not have any debug markers"
cp skaled/skaled skaled/skaled-debug
strip --strip-all skaled/skaled
strip skaled/skaled
cd ..
- name: Build and publish container
run: |
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/setup-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,6 @@ 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: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ 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 @@ -26,8 +32,6 @@ 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
33 changes: 7 additions & 26 deletions deps/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash


set -e
export SKALED_DEPS_CHAIN=1

Expand Down Expand Up @@ -1159,20 +1158,16 @@ then
#
echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}"
cd libuv
# eval ./autogen.sh
# eval ./configure "${CONF_CROSSCOMPILING_OPTS_GENERIC}" --enable-static --disable-shared --with-pic --prefix="$INSTALL_ROOT" "${CONF_DEBUG_OPTIONS}"
eval ./autogen.sh
eval ./configure "${CONF_CROSSCOMPILING_OPTS_GENERIC}" --enable-static --disable-shared --with-pic --prefix="$INSTALL_ROOT" "${CONF_DEBUG_OPTIONS}"
#--with-sysroot=="$INSTALL_ROOT"
mkdir build && cd build
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBUILD_SHARED_LIBS=OFF \
..
cd ../..
cd ..
fi
echo -e "${COLOR_INFO}building it${COLOR_DOTS}...${COLOR_RESET}"
cd libuv/build
cd libuv
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}"
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}" install
cd ../..
cd ..
cd "$SOURCES_ROOT"
else
echo -e "${COLOR_SUCCESS}SKIPPED${COLOR_RESET}"
Expand Down Expand Up @@ -1396,21 +1391,13 @@ then
cd boost_1_68_0
echo -e "${COLOR_INFO}configuring and building it${COLOR_DOTS}...${COLOR_RESET}"
eval ./bootstrap.sh --prefix="$INSTALL_ROOT" --with-libraries=atomic,context,filesystem,program_options,regex,system,thread,date_time,iostreams

if [ "$DEBUG" = "1" ]; then
variant=debug
else
variant=release
fi

if [ ${ARCH} = "arm" ]
then
sed -i -e 's#using gcc ;#using gcc : arm : /usr/local/toolchains/gcc7.2-arm/bin/arm-linux-gnueabihf-g++ ;#g' project-config.jam
eval ./b2 "${CONF_CROSSCOMPILING_OPTS_BOOST}" cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=$variant link=static threading=multi install
eval ./b2 "${CONF_CROSSCOMPILING_OPTS_BOOST}" cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install
else
eval ./b2 cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=$variant link=static threading=multi install
eval ./b2 cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install
fi

cd ..
cd "$SOURCES_ROOT"
else
Expand Down Expand Up @@ -2095,7 +2082,6 @@ 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/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 @@ -2105,8 +2091,6 @@ then
-DBOOST_ROOT="$INSTALL_ROOT" -DBOOST_LIBRARYDIR="$INSTALL_ROOT/lib" -DBoost_NO_WARN_NEW_VERSIONS=1 -DBoost_DEBUG=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF -DBUILD_BROKEN_TESTS=OFF -DBUILD_HANGING_TESTS=OFF -DBUILD_SLOW_TESTS=OFF \
-DCMAKE_INCLUDE_PATH="${INSTALL_ROOT}/include" \
-DCMAKE_LIBRARY_PATH="${INSTALL_ROOT}/lib" \
..
cd ..
else
Expand All @@ -2116,9 +2100,6 @@ then
cd build2
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
cd "$SOURCES_ROOT"
else
echo -e "${COLOR_SUCCESS}SKIPPED${COLOR_RESET}"
Expand Down
Loading