rust/compiler/rustc_target
Nicholas Bishop 9da96a65e1 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:🔙:link=info
cargo +stage1 build --release --target i686-unknown-uefi
2025-02-09 15:20:29 -05:00
..
src Disable DWARF in linker options for i686-unknown-uefi 2025-02-09 15:20:29 -05:00
Cargo.toml Remove unused intercrate dependencies 2024-11-07 14:17:16 +00:00
README.md Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00

rustc_target contains some very low-level details that are specific to different compilation targets and so forth.

For more information about how rustc works, see the rustc dev guide.