11# BUILD redisfab/clang:${CLANG_VER}-${ARCH}-${OSNICK}
22
33ARG OSNICK=bullseye
4- ARG CLANG_VER=13
4+ ARG OS=debian:bullseye
5+ ARG CLANG_VER=17
56ARG NINJA_VER=1.10.1
67
78# ----------------------------------------------------------------------------------------------
8- FROM debian:$OSNICK
9+ FROM ${OS}
910
1011ARG OSNICK
12+ ARG OS
1113ARG CLANG_VER
1214ARG CMAKE_VER
1315ARG NINJA_VER
@@ -19,9 +21,9 @@ SHELL ["/bin/bash", "-c"]
1921# Install prerequisites
2022
2123RUN apt-get -qq update
22- RUN apt-get install -y ca-certificates curl wget
23- RUN apt-get install -y software-properties-common apt-transport-https
24- RUN apt-get install -y git unzip lsb-release gnupg2 wget
24+ RUN apt-get install -qy ca-certificates curl wget
25+ RUN apt-get install -qy software-properties-common apt-transport-https
26+ RUN apt-get install -qy git unzip lsb-release gnupg2 wget
2527
2628RUN git clone https://github.com/RedisLabsModules/readies.git
2729
@@ -38,25 +40,25 @@ RUN set -e ;\
3840# ----------------------------------------------------------------------------------------------
3941# Install Clang
4042
41- RUN ./readies/bin/getclang --modern
43+ RUN ./readies/bin/getclang -v ${CLANG_VER}
4244
4345# ----------------------------------------------------------------------------------------------
4446# Build C++ runtime libs with msan instrumentation
4547
4648# build llvm for msan into /opt/llvm-project/build-msan
47- RUN set -e ;\
48- cd /opt ;\
49- git clone --depth=1 https://github.com/llvm/llvm-project ;\
50- cd llvm-project ;\
51- mkdir build-msan ;\
52- cd build-msan ;\
53- cmake -GNinja ../llvm \
54- -DCMAKE_BUILD_TYPE=Release \
55- -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
56- -DCMAKE_C_COMPILER=clang \
57- -DCMAKE_CXX_COMPILER=clang++ \
58- -DLLVM_USE_SANITIZER=MemoryWithOrigins ;\
59- cmake --build . -- cxx cxxabi
49+ # RUN set -e ;\
50+ # cd /opt ;\
51+ # git clone --depth=1 https://github.com/llvm/llvm-project ;\
52+ # cd llvm-project ;\
53+ # mkdir build-msan ;\
54+ # cd build-msan ;\
55+ # cmake -GNinja ../llvm \
56+ # -DCMAKE_BUILD_TYPE=Release \
57+ # -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
58+ # -DCMAKE_C_COMPILER=clang \
59+ # -DCMAKE_CXX_COMPILER=clang++ \
60+ # -DLLVM_USE_SANITIZER=MemoryWithOrigins ;\
61+ # cmake --build . -- cxx cxxabi
6062
6163# ----------------------------------------------------------------------------------------------
6264# Build Redis with asan/msan instrumentation
@@ -66,7 +68,12 @@ ADD redis.blacklist /build/
6668# build sanitizer-enabled redis-server(s)
6769# `--no-run` because Clang sanitizer requires SYS_PTRACE docker capability, which is not available in docker build
6870RUN set -e ;\
69- for redis_ver in 6.0 6.2; do \
71+ for redis_ver in 6.0 6.2 7.0 7.2-rc1 ; do \
7072 ./readies/bin/getredis --no-run -v $redis_ver --suffix asan-${redis_ver} --own-openssl --clang-asan --clang-san-blacklist /build/redis.blacklist ;\
71- ./readies/bin/getredis --no-run -v $redis_ver --suffix msan-${redis_ver} --own-openssl --clang-msan --llvm-dir /opt/llvm-project/build-msan --clang-san-blacklist /build/redis.blacklist ;\
7273 done
74+
75+ # RUN set -e ;\
76+ # for redis_ver in 6.0 6.2 7.0; do \
77+ # ./readies/bin/getredis --no-run -v $redis_ver --suffix asan-${redis_ver} --own-openssl --clang-asan --clang-san-blacklist /build/redis.blacklist ;\
78+ # ./readies/bin/getredis --no-run -v $redis_ver --suffix msan-${redis_ver} --own-openssl --clang-msan --llvm-dir /opt/llvm-project/build-msan --clang-san-blacklist /build/redis.blacklist ;\
79+ # done
0 commit comments