<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/debuginfo, branch 1.51.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.51.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.51.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-01-29T00:17:20+00:00</updated>
<entry>
<title>Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3</title>
<updated>2021-01-29T00:17:20+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2021-01-29T00:17:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d9e56f48c5ed6d40fff4e3277735df605e143791'/>
<id>urn:sha1:d9e56f48c5ed6d40fff4e3277735df605e143791</id>
<content type='text'>
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` -&gt; `-Csplit-debuginfo=packed`
* `-Zrun-dsymutil=no` -&gt; `-Csplit-debuginfo=unpacked`
* `-Zsplit-dwarf=single` -&gt; `-Csplit-debuginfo=packed`
* `-Zsplit-dwarf=split` -&gt; `-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
</content>
</entry>
<entry>
<title>rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`</title>
<updated>2021-01-28T16:51:11+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2020-11-30T16:39:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a124043fb019d46621c8b4b87dafb75d07cf78be'/>
<id>urn:sha1:a124043fb019d46621c8b4b87dafb75d07cf78be</id>
<content type='text'>
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` -&gt; `-Csplit-debuginfo=packed`
* `-Zrun-dsymutil=no` -&gt; `-Csplit-debuginfo=unpacked`
* `-Zsplit-dwarf=single` -&gt; `-Csplit-debuginfo=packed`
* `-Zsplit-dwarf=split` -&gt; `-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
</content>
</entry>
<entry>
<title>Use ty::{IntTy,UintTy,FloatTy} in rustc</title>
<updated>2021-01-18T20:09:30+00:00</updated>
<author>
<name>LeSeulArtichaut</name>
<email>leseulartichaut@gmail.com</email>
</author>
<published>2020-12-12T14:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=50e1ae15e9f3035b06bae00e1b1dc7a358546d3e'/>
<id>urn:sha1:50e1ae15e9f3035b06bae00e1b1dc7a358546d3e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #81008 - tmiasko:generator-layout-err, r=tmandry</title>
<updated>2021-01-15T09:26:16+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2021-01-15T09:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce06df2e4a1d2c8a1d092d39b589bb5d101b6c10'/>
<id>urn:sha1:ce06df2e4a1d2c8a1d092d39b589bb5d101b6c10</id>
<content type='text'>
Don't ICE when computing a layout of a generator tainted by errors

Fixes #80998.
</content>
</entry>
<entry>
<title>Don't ICE when computing a layout of a generator tainted by errors</title>
<updated>2021-01-14T12:13:13+00:00</updated>
<author>
<name>Tomasz Miąsko</name>
<email>tomasz.miasko@gmail.com</email>
</author>
<published>2021-01-14T00:00:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5ea1d0e865e3a15c054233198622b711ed0b5f86'/>
<id>urn:sha1:5ea1d0e865e3a15c054233198622b711ed0b5f86</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove the unused context from CreateDebugLocation</title>
<updated>2021-01-13T19:55:49+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2021-01-13T19:55:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0342fd16ffb146c849f1bb40d42ba1bb7a940b62'/>
<id>urn:sha1:0342fd16ffb146c849f1bb40d42ba1bb7a940b62</id>
<content type='text'>
This went unused in commit 88d874de6395, part of #68965.
</content>
</entry>
<entry>
<title>remove unused return types such as empty Results or Options that would always be Some(..)</title>
<updated>2020-12-30T12:15:40+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2020-12-29T21:24:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e5ead5fc5875ec2e32f001f25ec0007cd5d527fa'/>
<id>urn:sha1:e5ead5fc5875ec2e32f001f25ec0007cd5d527fa</id>
<content type='text'>
remove unused return type of dropck::check_drop_obligations()
don't wrap return type in Option in get_macro_by_def_id() since we would always return Some(..)
remove redundant return type of back::write::optimize()
don't Option-wrap return type of compute_type_parameters() since we always return Some(..)
don't return empty Result in assemble_generator_candidates()
don't return empty Result in assemble_closure_candidates()
don't return empty result in assemble_fn_pointer_candidates()
don't return empty result in assemble_candidates_from_impls()
don't return empty result in assemble_candidates_from_auto_impls()
don't return emtpy result in assemble_candidates_for_trait_alias()
don't return empty result in assemble_builtin_bound_candidates()
don't return empty results in assemble_extension_candidates_for_traits_in_scope() and assemble_extension_candidates_for_trait()
remove redundant wrapping of return type of StripItem::strip() since it always returns Some(..)
remove unused return type of assemble_extension_candidates_for_all_traits()
</content>
</entry>
<entry>
<title>cg_llvm: split dwarf filename and comp dir</title>
<updated>2020-12-16T10:33:52+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2020-11-08T17:17:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ee073b5ec54a13b393071298acc54e1fd28cfcdf'/>
<id>urn:sha1:ee073b5ec54a13b393071298acc54e1fd28cfcdf</id>
<content type='text'>
llvm-dwp concatenates `DW_AT_comp_dir` with `DW_AT_GNU_dwo_name` (only
when `DW_AT_comp_dir` exists), which can result in it failing to find
the DWARF object files.

In earlier testing, `DW_AT_comp_dir` wasn't present in the final
object and the current directory was the output directory.

When running tests through compiletest, the working directory of the
compilation is different from output directory and that resulted in
`DW_AT_comp_dir` being in the object file (and set to the current
working directory, rather than the output directory), and
`DW_AT_GNU_dwo_name` being set to the full path (rather than just
the filename), so llvm-dwp was failing.

This commit changes the compilation directory provided to LLVM to match
the output directory, where DWARF objects are output; and ensures that
only the filename is used for `DW_AT_GNU_dwo_name`.

Signed-off-by: David Wood &lt;david@davidtw.co&gt;
</content>
</entry>
<entry>
<title>cg_llvm: implement split dwarf support</title>
<updated>2020-12-16T10:33:47+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2020-09-23T16:33:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e3fdae9d81052cf521298d19f8bb32ba0332b589'/>
<id>urn:sha1:e3fdae9d81052cf521298d19f8bb32ba0332b589</id>
<content type='text'>
This commit implements Split DWARF support, wiring up the flag (added in
earlier commits) to the modified FFI wrapper (also from earlier
commits).

Signed-off-by: David Wood &lt;david@davidtw.co&gt;
</content>
</entry>
<entry>
<title>llvm: update ffi bindings for split dwarf</title>
<updated>2020-12-16T10:31:42+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2020-09-23T15:25:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=341aa97adb20ca22e0fcb0851014bfa2297ff932'/>
<id>urn:sha1:341aa97adb20ca22e0fcb0851014bfa2297ff932</id>
<content type='text'>
This commit modifies the FFI bindings to LLVM required for Split DWARF
support in rustc. In particular:

- `addPassesToEmitFile`'s wrapper, `LLVMRustWriteOutputFile` now takes
  a `DwoPath` `const char*`. When disabled, `nullptr` should be provided
  which will preserve existing behaviour. When enabled, the path to the
  `.dwo` file should be provided.
- `createCompileUnit`'s wrapper, `LLVMRustDIBuilderCreateCompileUnit`
  now has two additional arguments, for the `DWOId` and to enable
  `SplitDebugInlining`. `DWOId` should always be zero.
- `createTargetMachine`'s wrapper, `LLVMRustCreateTargetMachine` has an
  additional argument which should be provided the path to the `.dwo`
  when enabled.

Signed-off-by: David Wood &lt;david@davidtw.co&gt;
</content>
</entry>
</feed>
