Enable split_debuginfo=packed/unpacked for RISC-V#155135
Conversation
They are implemented in LLVM 22: llvm/llvm-project#56642 (comment)
|
These commits modify compiler targets. |
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Or is there any internal conditional compilation mechanism that I could use to disable |
|
It seems that the minimum supported LLVM version is 21.x. #153684 rust/src/bootstrap/src/core/build_steps/llvm.rs Lines 633 to 637 in d1d3ef4
I don’t think there’s an existing generic mechanism for this. |
Thanks! Then it's better waiting for the bump of minimum LLVM version to 22.1. |
|
@rustbot label A-LLVM O-riscv |
|
☔ The latest upstream changes (presumably #156023) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Visited during triage. @TaKO8Ki are you still ok with reviewing this or would you prefer handling this to someone from @rust-lang/wg-llvm ? thanks |
|
@apiraino I’m ok to review this pr, but we are waiting for the update. Please refer to this comment. #155135 (comment) |
|
@rustbot label -S-waiting-on-review S-waiting-on-LLVM llvm-fixed-upstream |
|
oh thank you, didn't notice that. Are we are specifically waiting on a patch update to downstream a fix (llvm/llvm-project#169653) for llvm/llvm-project#56642 ? The very latest downstream merge was 3 days ago (22.1.7) (I'm not super-familiar with LLVM releases) |
Yes.
We are waiting for the bump of minimum supported LLVM version to 22. Although the in-tree version of LLVM has been bumped to 22, it is still possible to build rust with external LLVM 21, where applying this patch would cause a regression. |
The packed/unpacked options are disabled for this target in #120518.
Now they are implemented in LLVM 22.1: llvm/llvm-project#56642 (comment).
Note that I am not sure about the minimum supported LLVM version for rustc.
This PR could wait for some time if the minimum supported LLVM version is below 22.1 on nightly/1.96.0.
Tests done
build/host/stage1/bin/rustc --edition=2024 src/main.rs --crate-type bin -C debuginfo=2 -C split-debuginfo=packed --target riscv64gc-unknown-linux-gnu -C linker=riscv64-linux-gnu-gccbuild/host/stage1/bin/rustc --edition=2024 src/main.rs --crate-type bin -C debuginfo=2 -C split-debuginfo=unpacked --target riscv64gc-unknown-linux-gnu -C linker=riscv64-linux-gnu-gccrun `./x test` on riscv64 linux to confirm the re-enabled tests pass. The only failure is #148748