Skip to content

Commit 764af14

Browse files
author
Jon Gjengset
committed
Build LLVM with support for compression
Through what seems to be an oversight we don't install libz in the aarch64 Docker image, which causes LLVM, and in turn both rustc and llvm-tools, to be built without support for compressing PGO and coverage files (and probably other things too). This patch rectifies that oversight so that aarch64 joins x86_64 in having compression support. Since we do this for both what writes and what reads these things, it doesn't usually manifest as an issue (beyond larger-than-necessary files). But it does mean that a profraw file written by rustc on x86_64 cannot be read by Rust's llvm-profdata on aarch64. It shows up in other situations too, such as if someone built rustc from source with zlib available on aarch64, but is using llvm-tools from rustup. So it feels worthwhile to fix. And for Google-ability, this tends to manifest with errors like: ``` profile uses zlib compression but the profile reader was built without zlib support ``` Note that we install `zlib1g-dev`, not `lib32z1-dev` as in the x86_64 image, since we're only building for 64-bit on aarch anyway.
1 parent 0677edc commit 764af14

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
1313
sudo \
1414
gdb \
1515
libssl-dev \
16+
zlib1g-dev \
1617
pkg-config \
1718
xz-utils
1819

0 commit comments

Comments
 (0)