Open infinity0 opened 7 years ago
I can see Debian turning on debuginfo and using gold
to improve link performance.
I remember something about split debuginfo being very useful in such builds. Maybe that's the case for all distro builds if the distro has separate debuginfo packages?
Yes, Debian does split debuginfo. However we don't usually need buildsystem-level support for that, we just use dh_strip
, which wraps around strip(1)
, after the build (e.g. here). I'm not sure what would be suitable for rust upstream.
@infinity0 Ah, there's a LLVM cmake option (or was, maybe it's changed since) to support that as part of the build, which, along with using gold
, drastically improved building with debuginfo for me.
https://github.com/rust-lang/rust/issues/67109 looks related.
This would be useful to help debug things like #42476. At the moment I can only debug it using Debian's rustc as stage0 - its LLVM is built separately and dynamically linked into librustc_llvm, so debugging symbols work there. However with rust's own 1.16 stage0 I get this instead:
< eddyb> infinity0: you have to build LLVM in a special way to get DWARF for it < eddyb> and if you don't do it right you can easily run out of memory < eddyb> I'm not even sure we support that mode < eddyb> ah https://github.com/rust-lang/rust/blob/master/src/bootstrap/config.toml.example#L21 < eddyb> see https://github.com/rust-lang/rust/blob/master/src/bootstrap/config.toml.example#L56-L59 < eddyb> might have to be set to 1 /cc @eddyb
I don't think we in Debian are doing anything particularly special, FWIW: https://sources.debian.net/src/llvm-toolchain-3.9/1:3.9.1-9/debian/rules/#L250 (@sylvestre is the maintainer).