mirror of
https://github.com/neovim/neovim.git
synced 2025-10-10 11:56:30 +00:00
Use the clang 3.4 release tarball instead of apt for clang 3.4.
It appears the llvm.org/apt/ repository isn't always reliable. So let's use the release tarball instead. Also, make using 3.4 conditional, so we can use the clang 3.3 if things still manage to go awry in the future. Note: using 3.3 means that we won't get leak detection. I left the logic for using llvm.org/apt/, just in case we want try using it again sometime.
This commit is contained in:
@@ -26,8 +26,18 @@ check_and_report() {
|
||||
MAKE_CMD="make -j2"
|
||||
|
||||
if [ "$CC" = "clang" ]; then
|
||||
# force using the version installed by 'travis-setup.sh'
|
||||
export CC=/usr/bin/clang
|
||||
if test -f /usr/local/clang-3.4/bin/clang; then
|
||||
USE_CLANG_34=true
|
||||
export CC=/usr/local/clang-3.4/bin/clang
|
||||
symbolizer=/usr/local/clang-3.4/bin/llvm-symbolizer
|
||||
fi
|
||||
|
||||
# Try to detect clang-3.4 installed via apt and through llvm.org/apt/.
|
||||
if dpkg -s clang-3.4 > /dev/null 2>&1; then
|
||||
USE_CLANG_34=true
|
||||
export CC=/usr/bin/clang
|
||||
symbolizer=/usr/bin/llvm-symbolizer-3.4
|
||||
fi
|
||||
|
||||
install_dir="$(pwd)/dist"
|
||||
# temporary directory for writing sanitizer logs
|
||||
@@ -36,13 +46,18 @@ if [ "$CC" = "clang" ]; then
|
||||
mkdir -p "$tmpdir"
|
||||
|
||||
# need the symbolizer path for stack traces with source information
|
||||
symbolizer=/usr/bin/llvm-symbolizer-3.4
|
||||
if [ -n "$USE_CLANG_34" ]; then
|
||||
export ASAN_OPTIONS="detect_leaks=1:"
|
||||
else
|
||||
symbolizer=/usr/local/clang-3.3/bin/llvm-symbolizer
|
||||
fi
|
||||
|
||||
export SKIP_UNITTEST=1
|
||||
export SANITIZE=1
|
||||
export ASAN_SYMBOLIZER_PATH=$symbolizer
|
||||
export ASAN_OPTIONS="detect_leaks=1:log_path=$tmpdir/asan"
|
||||
export ASAN_OPTIONS="${ASAN_OPTIONS}log_path=$tmpdir/asan"
|
||||
export TSAN_OPTIONS="external_symbolizer_path=$symbolizer:log_path=$tmpdir/tsan"
|
||||
|
||||
export SKIP_UNITTEST=1
|
||||
export UBSAN_OPTIONS="log_path=$tmpdir/ubsan" # not sure if this works
|
||||
|
||||
$MAKE_CMD cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$install_dir"
|
||||
|
Reference in New Issue
Block a user