Skip to content
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

rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all platforms, not just Apple ones. #92024

Merged
merged 1 commit into from
Dec 18, 2021

Commits on Dec 17, 2021

  1. rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all

    platforms, not just Apple ones.
    
    To avoid breaking split DWARF, we need to ensure that each codegen unit has a
    unique `DW_AT_name`. This is because there's a remote chance that different
    codegen units for the same module will have entirely identical DWARF entries
    for the purpose of the DWO ID, which would violate Appendix F ("Split Dwarf
    Object Files") of the DWARF 5 specification. LLVM uses the algorithm specified
    in section 7.32 "Type Signature Computation" to compute the DWO ID, which does
    not include any fields that would distinguish compilation units. So we must
    embed the codegen unit name into the `DW_AT_name`.
    
    Closes rust-lang#88521.
    pcwalton committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    c41fd76 View commit details
    Browse the repository at this point in the history