Skip to content

Commit 3ae8825

Browse files
Sanitizer options (#986)
* File that allows easier toggling of sanitizing options * Support a new "sanitize" option in evergreen generator
1 parent cf730fc commit 3ae8825

File tree

6 files changed

+115
-15
lines changed

6 files changed

+115
-15
lines changed

.evergreen/compile-unix.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ set -o errexit # Exit the script with error if any of the commands fail
1616
# SKIP_MOCK_TESTS Skips running the libmongoc mock server tests after compiling
1717
# Options for CMake:
1818
# LIBBSON Build against bundled or external libbson
19+
# SANITIZE Sanitizers to enable (comma-separated)
1920
# EXTRA_CONFIGURE_FLAGS Extra configure flags to use
2021
# EXTRA_CMAKE_PREFIX_PATH Extra directories to search for libraries/packages
2122
# ZLIB Build against bundled or external zlib, or none
@@ -45,6 +46,7 @@ ZLIB=${ZLIB:-BUNDLED}
4546
INSTALL_DIR=$(pwd)/install-dir
4647

4748
echo "CFLAGS: $CFLAGS"
49+
echo "SANITIZE: $SANITIZE"
4850
echo "MARCH: $MARCH"
4951
echo "RELEASE: $RELEASE"
5052
echo "DEBUG: $DEBUG"
@@ -198,6 +200,7 @@ esac
198200
if [ "darwin" = "$OS" -a "arm64" = "$MARCH" ]; then
199201
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DCMAKE_OSX_ARCHITECTURES=arm64"
200202
fi
203+
CONFIGURE_FLAGS="$CONFIGURE_FLAGS \"-DMONGO_SANITIZE=${SANITIZE}\""
201204

202205
if ! python3 build/mongodl.py --test -C csfle -V 5.3.1 -o . > /dev/null; then
203206
echo "No csfle detected for this platform. Disabling MONGOC_TEST_USE_CSFLE."

0 commit comments

Comments
 (0)