]> git.proxmox.com Git - cargo.git/commit
Add split-debuginfo profile option
authorAlex Crichton <alex@alexcrichton.com>
Fri, 29 Jan 2021 21:24:56 +0000 (13:24 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 1 Feb 2021 17:21:36 +0000 (09:21 -0800)
commited4568e108cdc371b60bb84828c50d16197ba6d7
tree4f88ecfbccb0b3a5e3ae0ef1613fde38099a7f2d
parent8a3361c126d0af96b5c30b3b3db336d04a0d810b
Add split-debuginfo profile option

This commit adds a new `split-debuginfo` option to Cargo compilation
profiles which gets forwarded to the `-Csplit-debuginfo` codegen option
in rustc. This commit also sets the default, only on macOS, to be
`-Csplit-debuginfo=unpacked`. The purpose of this change is to leverage
rust-lang/rust#79570 to avoid running `dsymutil` on incremental builds
while also preserving a pleasant debugging experience by default. This
should lead to much faster incremental build times on macOS since
`dsymutil` isn't exactly the speediest tool in the world.

This is technically a breaking change in Cargo because we're no longer
by-default producing the `*.dSYM` folders on macOS. If those are still
desired, however, authors can always run `dsymutil` themselves or
otherwise configure `split-debuginfo = 'packed'` in their
manifest/profile configuration.
15 files changed:
crates/cargo-test-support/src/lib.rs
src/cargo/core/compiler/build_context/target_info.rs
src/cargo/core/compiler/mod.rs
src/cargo/core/compiler/standard_lib.rs
src/cargo/core/compiler/unit_dependencies.rs
src/cargo/core/profiles.rs
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_compile.rs
src/cargo/util/toml/mod.rs
src/doc/src/reference/profiles.md
tests/testsuite/build.rs
tests/testsuite/out_dir.rs
tests/testsuite/profile_config.rs
tests/testsuite/rustc_info_cache.rs
tests/testsuite/unit_graph.rs