oxalica / rust-overlay

Pure and reproducible nix overlay of binary distributed rust toolchains
MIT License
956 stars 56 forks source link

Getting a toolchain with debuginfo_level #154

Closed happysalada closed 9 months ago

happysalada commented 10 months ago

First of all, thank you for your work on rust-overlay! the perfbook mentions https://nnethercote.github.io/perf-book/profiling.html#debug-info debuginfo_level for the rust std to include more information useful for profiling tools. Is there any way to have it with rust-overlay ? I couldn't find anything in the reference, so just asking here. Thank you again for providing this critical piece of software for rust and nix !

oxalica commented 9 months ago

https://nnethercote.github.io/perf-book/profiling.html#debug-info debuginfo_level for the rust std to include more information useful for profiling tools.

It reads:

The most reliable way around this is to build your own version of the compiler and standard library, following these instructions, and adding the following lines to the config.toml file:

[rust]
debuginfo-level = 1

It's a configuration to "build your own" rust. See here.

rust-overlay ships precompiled binaries from official rustup server and patch them for Nix use. We don't build rustc and std on our own, thus we are not able to change configurations for building std.