From beee192ed30387c315b412e517e71eb60d2d7dae Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Sun, 16 May 2021 23:32:33 +0200 Subject: [PATCH] Rust coverage: copy stdlib to the referenced directory (#5776) using rustc commit-hash version --- infra/base-images/base-builder/compile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infra/base-images/base-builder/compile b/infra/base-images/base-builder/compile index 00868b323..abdbfdb63 100755 --- a/infra/base-images/base-builder/compile +++ b/infra/base-images/base-builder/compile @@ -157,6 +157,10 @@ if [ "${BUILD_UID-0}" -ne "0" ]; then chown -R builder $SRC $OUT $WORK su -c "$BUILD_CMD" builder if [ "$SANITIZER" = "coverage" ]; then + # Copy rust std lib to its path with a hash + export rustch=`rustc --version --verbose | grep commit-hash | cut -d' ' -f2` + mkdir -p /rust/rustc/$rustch/ + cp -r /rust/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/ /rust/rustc/$rustch/ # Some directories have broken symlinks (e.g. honggfuzz), ignore the errors. su -c "$COPY_SOURCES_CMD" builder 2>/dev/null || true fi