Fix debuginfo compression in bootstrap#158169
Conversation
|
Thanks! @bors r+ |
This comment has been minimized.
This comment has been minimized.
Fix cc rs flag if supported Found in https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/weird.20code.20in.20fill_target_compiler/with/604588655. When `cc-rs` checks if a compiler flag is supported, it tries to read `out_dir` to generate the source file in. However, when this option is not set, then the check silently fails and the flag is considered to be unsupported. Since we didn't set `out_dir`, all such added flags were simply ignored. Normally, it reads `OUT_DIR`, which is fine if `cc-rs` is used within a build script. But if it is used elsewhere, then this is a pretty gnarly footgun in `cc-rs`, because the failure is [completely silent](https://github.com/rust-lang/cc-rs/blob/main/src/lib.rs#L1483). CC @madsmtm or @NobodyXu in case you have thoughts on that :) r? @bjorn3
This comment has been minimized.
This comment has been minimized.
|
💔 Test for b946733 failed: CI. Failed job:
|
|
@bors try jobs=x86_64-gnu-distcheck |
This comment has been minimized.
This comment has been minimized.
Fix cc rs flag if supported try-job: x86_64-gnu-distcheck
|
Thanks, I've opened an issue #1765, I think this is something we should fix. We could use a tempfile instead for it |
I think you meant rust-lang/cc-rs#1765 😉 |
|
@bors r=bjorn3 Let's try again. |
This comment has been minimized.
This comment has been minimized.
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Fix debuginfo compression in bootstrap try-job: dist-x86_64-msvc try-job: dist-x86_64-apple try-job: dist-x86_64-linux try-job: dist-various-1 try-job: dist-various-2
|
Ok, makes sense. @rustbot ready |
f1e4ba5 to
6bd414f
Compare
|
Some changes occurred in src/tools/cargo cc @ehuss |
This comment has been minimized.
This comment has been minimized.
6bd414f to
7c1d8b8
Compare
|
@bors r=bjorn3 rollup=never Another attempt! |
|
Threading between rollups @bors p=4 |
This comment has been minimized.
This comment has been minimized.
|
dist-x86_64-illumos has been running for 5 hours now. |
|
It took way longer to compile LLVM and LLD in the Illumos job, hmm. |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 4eb6253 (parent) -> 7148b31 (this PR) Test differencesShow 3 test diffsStage 2
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 7148b31956911d5d5496900bf564ca5212bf199b --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (7148b31): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -0.1%, secondary 1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.956s -> 489.438s (-0.11%) |
|
Let's see if the |
|
It went back (#158740 (comment)), so it was just sccache. Still might be interesting to take a look at exactly what flags have changed.. probably because we now pass |
|
We now also pass the compression flag when building LLVM, don't we? |
View all comments
Found through https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/weird.20code.20in.20fill_target_compiler/with/604588655.
This PR solves a few issues with debuginfo compression in bootstrap.
The main issue was that debuginfo compression through the
-gzflag wasn't enabled, by mistake.When
cc-rschecks if a compiler flag is supported, it tries to readout_dirto generate the source file in. However, when this option is not set, then the check silently fails and the flag is considered to be unsupported. Since we didn't setout_dir, all such added flags were simply ignored.Normally, it reads
OUT_DIR, which is fine ifcc-rsis used within a build script. But if it is used elsewhere, then this is a pretty gnarly footgun incc-rs, because the failure is completely silent. CC @madsmtm or @NobodyXu in case you have thoughts on that :)After that was fixed, I had to change the used compression flag from
-gzto--compress-debug-sections, to support both BFD and LLD linkers.And to solve it properly, and allow
distCI jobs to configure debuginfo compression for all targets that they build, I added a new bootstrap option to configure debuginfo compression.I wanted the flag to be configurable both globally and per target. At the same time, the flag applies both to C/C++ and Rust. We currently don't have such config area in
bootstrap.toml, and[build]didn't seem like the right place, so I shoved it into[rust](while documenting that it also applies to C/C++).r? @bjorn3
try-job: dist-x86_64-msvc
try-job: dist-x86_64-apple
try-job: dist-x86_64-linux
try-job: dist-various-1
try-job: dist-various-2