Skip to content

Commit 27bb8a4

Browse files
authored
Upload x86_64 sysroot libcxx with ASAN, MSAN and TSAN (#2254)
Summary: Upload x86_64 sysroot libcxx with ASAN, MSAN and TSAN TSIA Relevant Issues: N/A Type of change: /kind feature Test Plan: Clang image builds and runs Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 1c39c87 commit 27bb8a4

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

tools/docker/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ DEV_EXTRAS_IMAGE = "gcr.io/pixie-oss/pixie-dev-public/dev_image_with_extras:$(DE
3030

3131
## Clang deb parameters
3232
CLANG_VERSION := 15.0
33-
CLANG_SUFFIX := pl12
33+
CLANG_SUFFIX := pl13
3434

3535
CLANG_TAG="$(CLANG_VERSION)-$(CLANG_SUFFIX)"
3636

3737
clang_deb_fname := "clang-$(CLANG_TAG).deb"
3838
clang_linters_deb_fname := "clang-linters-$(CLANG_TAG).deb"
39-
clang_gs_path := gs://pixie-dev-public/clang/$(CLANG_TAG)
4039
clang_deb_image_tag := "gcr.io/pixie-oss/pixie-dev-public/clang_deb_builder_image:$(CLANG_VERSION)"
4140
CLANG_BUILD_DIR := "$(BUILD_DIR)/clang-$(CLANG_TAG)"
4241

@@ -164,7 +163,6 @@ upload_clang_deb: build_clang_deb_image ## Target to build and upload clang deb
164163
$(DOCKER) run --rm -e CLANG_SUFFIX=$(CLANG_SUFFIX) -e CLANG_VERSION=$(CLANG_VERSION) -v $(PWD)/$(CLANG_BUILD_DIR):/image $(clang_deb_image_tag)
165164

166165
sha256sum $(CLANG_BUILD_DIR)/* > $(CLANG_BUILD_DIR)/sha256sums
167-
gsutil cp $(CLANG_BUILD_DIR)/* $(clang_gs_path)/
168166
$(GH_RELEASE_UPLOAD) clang $(CLANG_TAG) $(CLANG_BUILD_DIR)/*
169167

170168
cat $(CLANG_BUILD_DIR)/sha256sums

tools/docker/clang_deb_image/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ FROM ubuntu:18.04@sha256:8aa9c2798215f99544d1ce7439ea9c3a6dfd82de607da1cec3a8a2f
1919
ENV DEBIAN_FRONTEND=noninteractive
2020
RUN apt-get update -y --fix-missing
2121
RUN apt-get install -y ruby ruby-dev rubygems build-essential
22+
RUN gem install dotenv -v 2.8.1
2223
RUN gem install --no-document fpm
2324

2425
RUN apt-get install -y bison build-essential flex git libedit-dev lsb \
@@ -177,6 +178,42 @@ RUN /scripts/build_llvm.sh \
177178
--sysroot /sysroots/x86_64 \
178179
--target_arch x86_64
179180

181+
# x86_64 sysroot with ASAN instrumentation.
182+
RUN /scripts/build_llvm.sh \
183+
--llvm_git_repo "${LLVM_GIT_PATH}" \
184+
--c_compiler_path "${CLANG}" \
185+
--cxx_compiler_path "${CLANGPP}" \
186+
--install_dir /opt/llvm-15.0-libcxx-x86_64-sysroot-asan \
187+
--build_type llvm_libs \
188+
--target_libcxx_path /opt/libcxx-15.0-x86_64-sysroot \
189+
--sysroot /sysroots/x86_64 \
190+
--target_arch x86_64 \
191+
--build_with_asan
192+
193+
# x86_64 sysroot with MSAN instrumentation.
194+
RUN /scripts/build_llvm.sh \
195+
--llvm_git_repo "${LLVM_GIT_PATH}" \
196+
--c_compiler_path "${CLANG}" \
197+
--cxx_compiler_path "${CLANGPP}" \
198+
--install_dir /opt/llvm-15.0-libcxx-x86_64-sysroot-msan \
199+
--build_type llvm_libs \
200+
--target_libcxx_path /opt/libcxx-15.0-x86_64-sysroot \
201+
--sysroot /sysroots/x86_64 \
202+
--target_arch x86_64 \
203+
--build_with_msan
204+
205+
# x86_64 sysroot with TSAN instrumentation.
206+
RUN /scripts/build_llvm.sh \
207+
--llvm_git_repo "${LLVM_GIT_PATH}" \
208+
--c_compiler_path "${CLANG}" \
209+
--cxx_compiler_path "${CLANGPP}" \
210+
--install_dir /opt/llvm-15.0-libcxx-x86_64-sysroot-tsan \
211+
--build_type llvm_libs \
212+
--target_libcxx_path /opt/libcxx-15.0-x86_64-sysroot \
213+
--sysroot /sysroots/x86_64 \
214+
--target_arch x86_64 \
215+
--build_with_tsan
216+
180217
# aarch64 sysroot
181218
RUN /scripts/build_llvm.sh \
182219
--llvm_git_repo "${LLVM_GIT_PATH}" \

tools/docker/clang_deb_image/create_packages.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ tar_llvm_libs "libcxx" "" "asan"
7373
tar_llvm_libs "libcxx" "" "msan"
7474
tar_llvm_libs "libcxx" "" "tsan"
7575
tar_llvm_libs "libcxx" "x86_64"
76+
tar_llvm_libs "libcxx" "x86_64" "asan"
77+
tar_llvm_libs "libcxx" "x86_64" "msan"
78+
tar_llvm_libs "libcxx" "x86_64" "tsan"
7679
tar_llvm_libs "libcxx" "aarch64"
7780

7881
tar_llvm_libs "libstdc++" ""

0 commit comments

Comments
 (0)