@@ -44,27 +44,37 @@ elif [ "$CI_OS_NAME" != "macos" ]; then
44
44
${CI_RETRY_EXE} bash -c " apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES "
45
45
fi
46
46
47
+ if [ -n " ${APT_LLVM_V} " ]; then
48
+ update-alternatives --install /usr/bin/clang++ clang++ " /usr/bin/clang++-${APT_LLVM_V} " 100
49
+ update-alternatives --install /usr/bin/clang clang " /usr/bin/clang-${APT_LLVM_V} " 100
50
+ update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer " /usr/bin/llvm-symbolizer-${APT_LLVM_V} " 100
51
+ fi
52
+
47
53
if [ -n " $PIP_PACKAGES " ]; then
48
54
# shellcheck disable=SC2086
49
55
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
50
56
fi
51
57
52
58
if [[ ${USE_MEMORY_SANITIZER} == " true" ]]; then
53
- ${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b " llvmorg-20.1.0" /msan/llvm-project
54
-
55
- cmake -G Ninja -B /msan/clang_build/ \
56
- -DLLVM_ENABLE_PROJECTS=" clang" \
57
- -DCMAKE_BUILD_TYPE=Release \
58
- -DLLVM_TARGETS_TO_BUILD=Native \
59
- -DLLVM_ENABLE_RUNTIMES=" compiler-rt;libcxx;libcxxabi;libunwind" \
60
- -S /msan/llvm-project/llvm
61
-
62
- ninja -C /msan/clang_build/ " $MAKEJOBS "
63
- ninja -C /msan/clang_build/ install-runtimes
64
-
65
- update-alternatives --install /usr/bin/clang++ clang++ /msan/clang_build/bin/clang++ 100
66
- update-alternatives --install /usr/bin/clang clang /msan/clang_build/bin/clang 100
67
- update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /msan/clang_build/bin/llvm-symbolizer 100
59
+ if [ -n " ${APT_LLVM_V} " ]; then
60
+ ${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b " llvmorg-$( clang --version | sed --silent ' s@.*clang version \([0-9.]*\).*@\1@p' ) " /msan/llvm-project
61
+ else
62
+ ${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b " llvmorg-20.1.8" /msan/llvm-project
63
+
64
+ cmake -G Ninja -B /msan/clang_build/ \
65
+ -DLLVM_ENABLE_PROJECTS=" clang" \
66
+ -DCMAKE_BUILD_TYPE=Release \
67
+ -DLLVM_TARGETS_TO_BUILD=Native \
68
+ -DLLVM_ENABLE_RUNTIMES=" compiler-rt;libcxx;libcxxabi;libunwind" \
69
+ -S /msan/llvm-project/llvm
70
+
71
+ ninja -C /msan/clang_build/ " $MAKEJOBS "
72
+ ninja -C /msan/clang_build/ install-runtimes
73
+
74
+ update-alternatives --install /usr/bin/clang++ clang++ /msan/clang_build/bin/clang++ 100
75
+ update-alternatives --install /usr/bin/clang clang /msan/clang_build/bin/clang 100
76
+ update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /msan/clang_build/bin/llvm-symbolizer 100
77
+ fi
68
78
69
79
cmake -G Ninja -B /msan/cxx_build/ \
70
80
-DLLVM_ENABLE_RUNTIMES=" libcxx;libcxxabi;libunwind" \
0 commit comments