Skip to content

Commit 1441e4e

Browse files
authored
CBL-7603: Add sanitizer flags to debug litecore prebuild (#2394)
We pass LITECORE_SANITIZE=ON to cmake in build_server_unix.sh when the CMAKE_BUILD_TYPE=Debug. Backported from CBL7096.
1 parent 9ff41f5 commit 1441e4e

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

jenkins/build_server_unix.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,21 @@ build_binaries () {
117117
CMAKE_BUILD_TYPE_NAME="cmake_build_type_${FLAVOR}"
118118
mkdir -p ${WORKSPACE}/build_${FLAVOR}
119119
pushd ${WORKSPACE}/build_${FLAVOR}
120+
121+
local cmakeOptions="-DBUILD_ENTERPRISE=$build_enterprise"
120122
if [[ ${OS} == 'linux' ]]; then
121-
cmake -DBUILD_ENTERPRISE=$build_enterprise -DEMBEDDED_MDNS=ON -DCMAKE_INSTALL_PREFIX=`pwd`/install -DCMAKE_BUILD_TYPE=${!CMAKE_BUILD_TYPE_NAME} -DLITECORE_MACOS_FAT_DEBUG=ON -DVERSION=${VERSION} -DBLD_NUM=${BLD_NUM} ../couchbase-lite-core
122-
else
123-
cmake -DBUILD_ENTERPRISE=$build_enterprise -DCMAKE_INSTALL_PREFIX=`pwd`/install -DCMAKE_BUILD_TYPE=${!CMAKE_BUILD_TYPE_NAME} -DLITECORE_MACOS_FAT_DEBUG=ON -DVERSION=${VERSION} -DBLD_NUM=${BLD_NUM} ../couchbase-lite-core
123+
cmakeOptions="${cmakeOptions} -DEMBEDDED_MDNS=ON"
124+
fi
125+
cmakeOptions="${cmakeOptions} \
126+
-DCMAKE_INSTALL_PREFIX=$(pwd)/install \
127+
-DCMAKE_BUILD_TYPE=${!CMAKE_BUILD_TYPE_NAME} \
128+
-DLITECORE_MACOS_FAT_DEBUG=ON \
129+
-DVERSION=${VERSION} \
130+
-DBLD_NUM=${BLD_NUM}"
131+
if [[ ${FLAVOR} == "debug" ]]; then
132+
cmakeOptions="${cmakeOptions} -DLITECORE_SANITIZE=ON"
124133
fi
134+
cmake ${cmakeOptions} ../couchbase-lite-core
125135
make -j8
126136
if [[ ${OS} == 'linux' ]]; then
127137
${WORKSPACE}/couchbase-lite-core/build_cmake/scripts/strip.sh $PWD

0 commit comments

Comments
 (0)