mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 12:39:31 +03:00
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
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Change this file to make users of the `download-ci-llvm` configuration download
|
||||
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.
|
||||
|
||||
Last change is for: https://github.com/rust-lang/rust/pull/138784
|
||||
Last change is for: https://github.com/rust-lang/rust/pull/139931
|
||||
|
||||
@@ -370,8 +370,8 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
|
||||
cfg.define("LLVM_PROFDATA_FILE", path);
|
||||
}
|
||||
|
||||
// Libraries for ELF section compression.
|
||||
if !target.is_windows() {
|
||||
// Libraries for ELF section compression and profraw files merging.
|
||||
if !target.is_msvc() {
|
||||
cfg.define("LLVM_ENABLE_ZLIB", "ON");
|
||||
} else {
|
||||
cfg.define("LLVM_ENABLE_ZLIB", "OFF");
|
||||
|
||||
Reference in New Issue
Block a user