build: also build static binaries with -O2

This commit is contained in:
Marcus Holland-Moritz 2024-01-21 11:49:23 +01:00
parent e0bcadd02c
commit 340c96fd56
2 changed files with 39 additions and 31 deletions

View File

@ -77,6 +77,10 @@ case "-$BUILD_TYPE-" in
exit 1 exit 1
esac esac
if [[ "-$BUILD_TYPE-" == *-O2-* ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DDWARFS_OPTIMIZE=2"
fi
if [[ "-$BUILD_TYPE-" == *-nojemalloc-* ]]; then if [[ "-$BUILD_TYPE-" == *-nojemalloc-* ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DUSE_JEMALLOC=0" CMAKE_ARGS="${CMAKE_ARGS} -DUSE_JEMALLOC=0"
fi fi
@ -117,8 +121,9 @@ if [[ "-$BUILD_TYPE-" == *-coverage-* ]]; then
fi fi
if [[ "-$BUILD_TYPE-" == *-static-* ]]; then if [[ "-$BUILD_TYPE-" == *-static-* ]]; then
if [[ "-$BUILD_TYPE-" == *-release-* ]]; then
# in the clang-release-static case, we also try to build from the source tarball # in the clang-release-static case, we also try to build from the source tarball
if [[ "-$BUILD_TYPE-" == *-release-* ]] && [[ "-$BUILD_TYPE-" == *-clang-* ]]; then if [[ "-$BUILD_TYPE-" == *-clang-* ]] && [[ "-$BUILD_TYPE-" != *-O2-* ]]; then
$BUILD_TOOL package_source $BUILD_TOOL package_source
if [[ "$BUILD_ARCH" == "amd64" ]]; then if [[ "$BUILD_ARCH" == "amd64" ]]; then
@ -150,6 +155,7 @@ if [[ "-$BUILD_TYPE-" == *-static-* ]]; then
$BUILD_TOOL $BUILD_TOOL
ctest --output-on-failure -j$(nproc) ctest --output-on-failure -j$(nproc)
fi
$BUILD_TOOL strip $BUILD_TOOL strip
fi fi

View File

@ -106,7 +106,9 @@ jobs:
- oldgcc-debug-make - oldgcc-debug-make
- clang-release-ninja - clang-release-ninja
- gcc-release-ninja-static - gcc-release-ninja-static
- gcc-release-ninja-O2-static
- clang-release-ninja-static - clang-release-ninja-static
- clang-release-ninja-O2-static
- clang-reldbg-ninja-static - clang-reldbg-ninja-static
- clang-debug-ninja-static - clang-debug-ninja-static
include: include: