mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
596235281c
Add LLVM flags to limit DWARF version to 2 on BSD This has been a thorn in my side for a while, I can finally generate flamegraphs of rust programs on bsd again. This fixes dtrace profiling on freebsd, I think it might help with lldb as well but I can't test that because my current rust-lldb setup is messed up. I'm limiting the dwarf version to 2 on all bsd's (netbsd/openbsd/freebsd) since it looks like this applies to all of them, but I have only tested on freebsd. Let me know if there's anything I can improve! --- Currently on FreeBSD dtrace profiling does not work and shows jumbled/incorrect symbols in the backtraces. FreeBSD does not support the latest versions of DWARF in dtrace (and lldb?) yet, and needs to be limited to DWARF2 in the same way as macos. This adds an is_like_bsd flag since it was missing. NetBSD/OpenBSD/FreeBSD all match this. This effectively copies #11864 but targets FreeBSD instead of macos. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
The codegen
crate contains the code to convert from MIR into LLVM IR,
and then from LLVM IR into machine code. In general it contains code
that runs towards the end of the compilation process.
For more information about how codegen works, see the rustc dev guide.