forked from bloomberg/blazingmq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aleksandr Ivanov <[email protected]>
- Loading branch information
1 parent
bd36cb4
commit 4a6d2e4
Showing
2 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script can be used to build BlazingMQ, and all of its transitive | ||
# dependencies (up to and including the standard library) using: | ||
# - Clang | ||
# - LLVM libc++ standard library | ||
# - A CMake toolchain file specific for instrumented build | ||
# It is currently used to build instrumented BlazingMQ binaries for CI for all | ||
# Clang sanitizers (i.e. Address/Leak, Memory, Thread, UndefinedBehavior). | ||
# | ||
# It performs the following: | ||
# 1) Install clang compiler. | ||
# 2) Download llvm-project required for libc++ instrumentation. | ||
# 3) Download external dependencies required for instrumentation. | ||
# 4) Build libc++ with the instrumentation specified by <LLVM Sanitizer Name>. | ||
# 5) Build sanitizer-instrumented dependencies including BDE, NTF, GoogleTest, | ||
# Google Benchmark and zlib. | ||
# 6) Build sanitizer-instrumented BlazingMQ unit tests. | ||
# 7) Generate scripts to run unit tests: | ||
# ./cmake.bld/Linux/run-unittests.sh | ||
# This script is used as-is by CI to run unit tests with sanitizer. | ||
|
||
set -eux | ||
|
||
# :: Required arguments ::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
if [ -z ${1} ]; then | ||
echo 'Error: Missing sanitizer name.' >&2 | ||
echo ' (Usage: build_sanitizer.sh <sanitizer-name>)' >&2 | ||
exit 1 | ||
fi | ||
|
||
SANITIZER_NAME="${1}" | ||
|
||
echo SANITIZER_NAME: "${SANITIZER_NAME}" | ||
echo ROOT: "${PWD}" |