Skip to content

Commit bf26963

Browse files
committed
bootstrap: enable zlib for LLVM when we compile it for profiling
when compiling target LLVM with `opt-dist local` on Windows/MinGW, profraw files are being compressed with zlib, so compiling without it will make `llvm-profdata` complain about lacking of zlib support. this error is shown: `profile uses zlib compression but the profile reader was built without zlib support` example from llvm test suite: https://github.com/llvm/llvm-project/blob/76b5fcbf975547251faaeed8b567ea09d139a607/llvm/test/tools/llvm-profdata/nocompress.test#L15
1 parent afa859f commit bf26963

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bootstrap/download-ci-llvm-stamp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Change this file to make users of the `download-ci-llvm` configuration download
22
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.
33

4-
Last change is for: https://github.com/rust-lang/rust/pull/138784
4+
Last change is for: https://github.com/rust-lang/rust/pull/139931

src/bootstrap/src/core/build_steps/llvm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ impl Step for Llvm {
370370
cfg.define("LLVM_PROFDATA_FILE", path);
371371
}
372372

373-
// Libraries for ELF section compression.
374-
if !target.is_windows() {
373+
// Libraries for ELF section compression and profraw files merging.
374+
if !target.is_msvc() {
375375
cfg.define("LLVM_ENABLE_ZLIB", "ON");
376376
} else {
377377
cfg.define("LLVM_ENABLE_ZLIB", "OFF");

0 commit comments

Comments
 (0)