bootstrap: add split-debuginfo config

Replace `run-dysutil` option with more general `split-debuginfo` option
that works on all platforms.

Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
David Wood
2022-02-14 03:39:32 +00:00
parent e27d9df431
commit 7593c50d43
3 changed files with 78 additions and 21 deletions

View File

@@ -473,13 +473,28 @@ changelog-seen = 2
# FIXME(#61117): Some tests fail when this option is enabled.
#debuginfo-level-tests = 0
# Whether to run `dsymutil` on Apple platforms to gather debug info into .dSYM
# bundles. `dsymutil` adds time to builds for no clear benefit, and also makes
# it more difficult for debuggers to find debug info. The compiler currently
# defaults to running `dsymutil` to preserve its historical default, but when
# compiling the compiler itself, we skip it by default since we know it's safe
# to do so in that case.
#run-dsymutil = false
# Should rustc be build with split debuginfo? Default is platform dependent.
# Valid values are the same as those accepted by `-C split-debuginfo`
# (`off`/`unpacked`/`packed`).
#
# On Linux, packed split debuginfo is used by default, which splits debuginfo
# into a separate `rustc.dwp` file. Split DWARF on Linux results in lower
# linking times (there's less debuginfo for the linker to process),
# `split-debuginfo` is enabled on default for Linux. Unpacked debuginfo could
# technically work too, but the cost of running the DWARF packager is marginal
# and results in debuginfo being in a single file.
#
# On Apple platforms, unpacked split debuginfo is used by default. Unpacked
# debuginfo does not run `dsymutil`, which packages debuginfo from disparate
# object files into a single `.dSYM` file. `dsymutil` adds time to builds for
# no clear benefit, and also makes it more difficult for debuggers to find
# debug info. The compiler currently defaults to running `dsymutil` to preserve
# its historical default, but when compiling the compiler itself, we skip it by
# default since we know it's safe to do so in that case.
#
# On Windows platforms, packed debuginfo is the only supported option,
# producing a `.pdb` file.
#split-debuginfo = if linux { packed } else if windows { packed } else if apple { unpacked }
# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
#backtrace = true