rust/compiler
Yuki Okushi d9e56f48c5
Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3
rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`

This commit adds a new stable codegen option to rustc,
`-Csplit-debuginfo`. The old `-Zrun-dsymutil` flag is deleted and now
subsumed by this stable flag. Additionally `-Zsplit-dwarf` is also
subsumed by this flag but still requires `-Zunstable-options` to
actually activate. The `-Csplit-debuginfo` flag takes one of
three values:

* `off` - This indicates that split-debuginfo from the final artifact is
  not desired. This is not supported on Windows and is the default on
  Unix platforms except macOS. On macOS this means that `dsymutil` is
  not executed.

* `packed` - This means that debuginfo is desired in one location
  separate from the main executable. This is the default on Windows
  (`*.pdb`) and macOS (`*.dSYM`). On other Unix platforms this subsumes
  `-Zsplit-dwarf=single` and produces a `*.dwp` file.

* `unpacked` - This means that debuginfo will be roughly equivalent to
  object files, meaning that it's throughout the build directory
  rather than in one location (often the fastest for local development).
  This is not the default on any platform and is not supported on Windows.

Each target can indicate its own default preference for how debuginfo is
handled. Almost all platforms default to `off` except for Windows and
macOS which default to `packed` for historical reasons.

Some equivalencies for previous unstable flags with the new flags are:

* `-Zrun-dsymutil=yes` -> `-Csplit-debuginfo=packed`
* `-Zrun-dsymutil=no` -> `-Csplit-debuginfo=unpacked`
* `-Zsplit-dwarf=single` -> `-Csplit-debuginfo=packed`
* `-Zsplit-dwarf=split` -> `-Csplit-debuginfo=unpacked`

Note that `-Csplit-debuginfo` still requires `-Zunstable-options` for
non-macOS platforms since split-dwarf support was *just* implemented in
rustc.

There's some more rationale listed on #79361, but the main gist of the
motivation for this commit is that `dsymutil` can take quite a long time
to execute in debug builds and provides little benefit. This means that
incremental compile times appear that much worse on macOS because the
compiler is constantly running `dsymutil` over every single binary it
produces during `cargo build` (even build scripts!). Ideally rustc would
switch to not running `dsymutil` by default, but that's a problem left
to get tackled another day.

Closes #79361
2021-01-29 09:17:20 +09:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Refactor token collection to capture trailing token immediately 2021-01-22 00:33:03 -05:00
rustc_ast_lowering Rollup merge of #81249 - cjgillot:issue-79537, r=oli-obk 2021-01-23 20:16:07 +01:00
rustc_ast_passes Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_pretty Remove unused dependency 2021-01-23 10:30:38 +01:00
rustc_attr Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_builtin_macros Rollup merge of #80855 - m-ou-se:assert-2021, r=petrochenkov 2021-01-24 22:09:53 +01:00
rustc_codegen_cranelift Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
rustc_codegen_llvm Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3 2021-01-29 09:17:20 +09:00
rustc_codegen_ssa Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3 2021-01-29 09:17:20 +09:00
rustc_data_structures Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_driver Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_error_codes Fix spelling in documentation for error E0207 2021-01-24 20:31:42 +01:00
rustc_errors Avoid describing a method as 'not found' when bounds are unsatisfied 2021-01-26 23:59:50 -05:00
rustc_expand Rollup merge of #81284 - jyn514:impl-times, r=wesleywiser 2021-01-28 15:09:10 +09:00
rustc_feature Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #81393 - pnkfelix:issue-81296-make-weak-item-traversal-deterministic, r=estebank 2021-01-27 00:19:45 +00:00
rustc_hir_pretty Add loop head span to hir 2021-01-21 21:41:46 -08:00
rustc_incremental Auto merge of #80957 - tgnottingham:direct_serialize_depgraph, r=michaelwoerister 2021-01-19 19:36:41 +00:00
rustc_index
rustc_infer Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis 2021-01-28 15:09:02 +09:00
rustc_interface Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3 2021-01-29 09:17:20 +09:00
rustc_lexer
rustc_lint Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis 2021-01-28 15:09:02 +09:00
rustc_lint_defs update const_err description 2021-01-22 10:21:52 +01:00
rustc_llvm Use probe-stack=inline-asm in LLVM 11+ 2021-01-14 22:49:16 -05:00
rustc_macros Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_metadata Check for rmeta crates when getting existing crates from cache 2021-01-26 19:39:24 +01:00
rustc_middle Rollup merge of #81062 - sexxi-goose:precise_capture_diagnostics, r=nikomatsakis 2021-01-28 15:09:06 +09:00
rustc_mir Auto merge of #81441 - tmiasko:ctfe-inline, r=oli-obk 2021-01-28 15:19:16 +00:00
rustc_mir_build Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis 2021-01-28 15:09:02 +09:00
rustc_parse Point only at generic arguments when they are unexpected 2021-01-26 15:59:43 -08:00
rustc_parse_format rustc_parse_format: Fix character indices in find_skips 2021-01-17 17:40:58 +03:00
rustc_passes Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis 2021-01-28 15:09:02 +09:00
rustc_plugin_impl
rustc_privacy Review changes 2021-01-16 18:56:37 -05:00
rustc_query_system Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank 2021-01-26 05:47:23 +00:00
rustc_resolve Rollup merge of #81252 - jyn514:resolve-timing, r=petrochenkov 2021-01-23 20:16:09 +01:00
rustc_save_analysis Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_serialize rustc_serialize: fix incorrect signed LEB128 decoding 2021-01-11 12:13:26 -08:00
rustc_session Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3 2021-01-29 09:17:20 +09:00
rustc_span Rollup merge of #81277 - flip1995:from_diag_items, r=matthewjasper 2021-01-28 15:09:08 +09:00
rustc_symbol_mangling Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
rustc_target Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3 2021-01-29 09:17:20 +09:00
rustc_trait_selection Auto merge of #81055 - matthewjasper:non-fatal-overflow, r=nikomatsakis 2021-01-28 18:57:10 +00:00
rustc_traits Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
rustc_ty_utils Infallible version of def_span. 2021-01-23 13:35:22 +01:00
rustc_type_ir Move a few more types to rustc_type_ir 2021-01-18 21:06:12 +01:00
rustc_typeck Auto merge of #81149 - Aaron1011:feature/better-no-method-found-err, r=estebank 2021-01-28 12:09:50 +00:00