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

compiler: Switch to DWARF 5 by default for zig cc and the LLVM backend. #22235

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Dec 15, 2024

This is the same version we're targeting for the self-hosted backends.

@alexrp
Copy link
Member Author

alexrp commented Dec 15, 2024

@Rexicon226 are you interested in this? https://github.com/ziglang/zig/actions/runs/12336006799/job/34428085051?pr=22235

error: fatal linker error: unhandled relocation type R_RISCV_SET_ULEB128 at offset 0x163ec
    note: in C:\Users\CI\actions-runner-3\_work\zig\zig\build-release\zig-global-cache\o\34901702e1b80b35a620f8084e08f477\libcompiler_rt.a(C:\Users\CI\actions-runner-3\_work\zig\zig\build-release\zig-global-cache\o\34901702e1b80b35a620f8084e08f477\libcompiler_rt.a.o/):.debug_loclists

@Rexicon226
Copy link
Contributor

Sure, let me quickly implement that and give you a commit.

@Rexicon226
Copy link
Contributor

here you go! Rexicon226@cba1b3b

i'm still not 100% sure what these relocations are actually doing with dwarf but I objdumped some binaries and they have the right source code locations 🤷

@alexrp
Copy link
Member Author

alexrp commented Dec 15, 2024

Nice, thanks!

@alexrp
Copy link
Member Author

alexrp commented Dec 15, 2024

Hmm, the self-hosted WebAssembly linker is not having a good time with this: https://github.com/ziglang/zig/actions/runs/12337349953/job/34430969217?pr=22235

error: unknown section: .debug_str_offsets

I guess I'll mark this as draft until #22220 is merged; no point mucking about in the linker code until then.

@alexrp alexrp marked this pull request as draft December 15, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants