-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable DWARF in linker options for i686-unknown-uefi #136791
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fixes an lld warning: > warning: linker stderr: rust-lld: section name .debug_frame is longer > than 8 characters and will use a non-standard string table See https://reviews.llvm.org/D69594 for details of where the warning was added. This warning only occurs with the i686 UEFI target, not x86_64 or aarch64. The x86_64 target uses an LLVM target of `x86_64-unknown-windows` and aarch64 uses `aarch64-unknown-windows`, but i686 uses `i686-unknown-windows-gnu` (note the `-gnu`). See comments in `i686_unknown_uefi.rs` for details of why. The `.debug_frame` section should not actually be needed; UEFI targets provide a separate PDB file for debugging. Disable DWARF (and by extension the `.debug_frame` section) by passing `/DEBUG:NODWARF` to lld. Tested with: export RUSTC_LOG=rustc_codegen_ssa::back::link=info cargo +stage1 build --release --target i686-unknown-uefi
These commits modify compiler targets. |
Oh. Hmm. That seems reasonable, I don't know why we would need both DWARF and PDB for the same object file. |
jieyouxu
approved these changes
Feb 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me as well, thanks
@bors r+ rollup |
16 tasks
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2025
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#136419 (adding autodiff tests) - rust-lang#136628 (ci: upgrade to crosstool-ng 1.27.0) - rust-lang#136681 (resolve `llvm-config` path properly on cross builds) - rust-lang#136714 (Update `compiler-builtins` to 0.1.146) - rust-lang#136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync") - rust-lang#136791 (Disable DWARF in linker options for i686-unknown-uefi) Failed merges: - rust-lang#136767 (improve host/cross target checking) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2025
Rollup merge of rust-lang#136791 - nicholasbishop:bishop-disable-dwarf, r=jieyouxu Disable DWARF in linker options for i686-unknown-uefi This fixes an lld warning: > warning: linker stderr: rust-lld: section name .debug_frame is longer than 8 characters and will use a non-standard string table See https://reviews.llvm.org/D69594 for details of where the warning was added. This warning only occurs with the i686 UEFI target, not x86_64 or aarch64. The x86_64 target uses an LLVM target of `x86_64-unknown-windows` and aarch64 uses `aarch64-unknown-windows`, but i686 uses `i686-unknown-windows-gnu` (note the `-gnu`). See comments in `i686_unknown_uefi.rs` for details of why. The `.debug_frame` section should not actually be needed; UEFI targets provide a separate PDB file for debugging. Disable DWARF (and by extension the `.debug_frame` section) by passing `/DEBUG:NODWARF` to lld. Tested with: ``` export RUSTC_LOG=rustc_codegen_ssa::back::link=info cargo +stage1 build --release --target i686-unknown-uefi ``` This issue was originally raised here: rust-lang#119286 (comment). See also rust-lang#136096. It was suggested to file an LLVM bug, but I don't think LLVM is actually doing anything wrong as such. CC `@dvdhrm` `@jyn514` let me know if you have any feedback on this approach
github-actions bot
pushed a commit
to tautschnig/verify-rust-std
that referenced
this pull request
Mar 11, 2025
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#136419 (adding autodiff tests) - rust-lang#136628 (ci: upgrade to crosstool-ng 1.27.0) - rust-lang#136681 (resolve `llvm-config` path properly on cross builds) - rust-lang#136714 (Update `compiler-builtins` to 0.1.146) - rust-lang#136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync") - rust-lang#136791 (Disable DWARF in linker options for i686-unknown-uefi) Failed merges: - rust-lang#136767 (improve host/cross target checking) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to tautschnig/verify-rust-std
that referenced
this pull request
Mar 11, 2025
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#136419 (adding autodiff tests) - rust-lang#136628 (ci: upgrade to crosstool-ng 1.27.0) - rust-lang#136681 (resolve `llvm-config` path properly on cross builds) - rust-lang#136714 (Update `compiler-builtins` to 0.1.146) - rust-lang#136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync") - rust-lang#136791 (Disable DWARF in linker options for i686-unknown-uefi) Failed merges: - rust-lang#136767 (improve host/cross target checking) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an lld warning:
See https://reviews.llvm.org/D69594 for details of where the warning was added.
This warning only occurs with the i686 UEFI target, not x86_64 or aarch64. The x86_64 target uses an LLVM target of
x86_64-unknown-windows
and aarch64 usesaarch64-unknown-windows
, but i686 usesi686-unknown-windows-gnu
(note the-gnu
). See comments ini686_unknown_uefi.rs
for details of why.The
.debug_frame
section should not actually be needed; UEFI targets provide a separate PDB file for debugging. Disable DWARF (and by extension the.debug_frame
section) by passing/DEBUG:NODWARF
to lld.Tested with:
This issue was originally raised here: #119286 (comment). See also #136096. It was suggested to file an LLVM bug, but I don't think LLVM is actually doing anything wrong as such.
CC @dvdhrm @jyn514 let me know if you have any feedback on this approach