<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/debuginfo, branch 1.52.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.52.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.52.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-03-07T20:23:23+00:00</updated>
<entry>
<title>Auto merge of #82285 - nhwn:nonzero-debug, r=nagisa</title>
<updated>2021-03-07T20:23:23+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-03-07T20:23:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=234781afe33d3f339b002f85f948046d8476cfc9'/>
<id>urn:sha1:234781afe33d3f339b002f85f948046d8476cfc9</id>
<content type='text'>
Use u32 over Option&lt;u32&gt; in DebugLoc

~~Changes `Option&lt;u32&gt;` fields in `DebugLoc` to `Option&lt;NonZeroU32&gt;`. Since the respective fields (`line` and `col`) are guaranteed to be 1-based, this layout optimization is a freebie.~~

EDIT: Changes `Option&lt;u32&gt;` fields in `DebugLoc` to `u32`. As `@bugadani` pointed out, an `Option&lt;NonZeroU32&gt;` is probably an unnecessary layer of abstraction since the `None` variant is always used as `UNKNOWN_LINE_NUMBER` (which is just `0`).  Also, `SourceInfo` in `metadata.rs` already uses a `u32` instead of an `Option&lt;u32&gt;` to encode the same information, so I think this change is warranted.

Since `@jyn514` raised some concerns over measuring performance in a similar PR (#82255), does this need a perf run?
</content>
</entry>
<entry>
<title>Box generator-related Body fields</title>
<updated>2021-03-01T07:32:49+00:00</updated>
<author>
<name>Dániel Buga</name>
<email>bugadani@gmail.com</email>
</author>
<published>2021-01-17T12:27:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b97eb23cd02d9fb848cac071b02250fbdb0e34c5'/>
<id>urn:sha1:b97eb23cd02d9fb848cac071b02250fbdb0e34c5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #82057 - upsuper-forks:cstr, r=davidtwco,wesleywiser</title>
<updated>2021-02-27T01:34:21+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>dylan.dpc@gmail.com</email>
</author>
<published>2021-02-27T01:34:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cabe97272d782294e0d642135f3d8b13579b2929'/>
<id>urn:sha1:cabe97272d782294e0d642135f3d8b13579b2929</id>
<content type='text'>
Replace const_cstr with cstr crate

This PR replaces the `const_cstr` macro inside `rustc_data_structures` with `cstr` macro from [cstr](https://crates.io/crates/cstr) crate.

The two macros basically serve the same purpose, which is to generate `&amp;'static CStr` from a string literal. `cstr` is better because it validates the literal at compile time, while the existing `const_cstr` does it at runtime when `debug_assertions` is enabled. In addition, the value `cstr` generates can be used in constant context (which is seemingly not needed anywhere currently, though).
</content>
</entry>
<entry>
<title>fix review</title>
<updated>2021-02-25T01:21:12+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2021-02-25T01:13:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=08b1e8004b06112fb8334155b2cea314bd3e8161'/>
<id>urn:sha1:08b1e8004b06112fb8334155b2cea314bd3e8161</id>
<content type='text'>
</content>
</entry>
<entry>
<title>replaced some map_or with map_or_else</title>
<updated>2021-02-23T23:43:35+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2021-02-23T22:02:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c75c4a579bdea69fc9b93697aa2531daf82540fc'/>
<id>urn:sha1:c75c4a579bdea69fc9b93697aa2531daf82540fc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nhwn: use plain u32 in DebugLoc</title>
<updated>2021-02-20T17:46:58+00:00</updated>
<author>
<name>Nathan Nguyen</name>
<email>nathan.tm.nguyen@gmail.com</email>
</author>
<published>2021-02-19T20:50:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=408d4027d0c469be4ab442b8d0223565cdb09229'/>
<id>urn:sha1:408d4027d0c469be4ab442b8d0223565cdb09229</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nhwn: use Option&lt;NonZeroU32&gt; in DebugLoc</title>
<updated>2021-02-20T17:46:50+00:00</updated>
<author>
<name>Nathan Nguyen</name>
<email>nathan.tm.nguyen@gmail.com</email>
</author>
<published>2021-02-19T05:18:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f5aa1bceb92ce2207a2f3db07c3fe892fa196086'/>
<id>urn:sha1:f5aa1bceb92ce2207a2f3db07c3fe892fa196086</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Set path of the compile unit to the source directory</title>
<updated>2021-02-14T15:12:14+00:00</updated>
<author>
<name>Simonas Kazlauskas</name>
<email>git@kazlauskas.me</email>
</author>
<published>2021-02-14T15:12:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=16c71886c9ed143a22890f99c59deea37b157fa8'/>
<id>urn:sha1:16c71886c9ed143a22890f99c59deea37b157fa8</id>
<content type='text'>
As part of the effort to implement split dwarf debug info, we ended up
setting the compile unit location to the output directory rather than
the source directory. Furthermore, it seems like we failed to remap the
prefixes for this as well!

The desired behaviour is to instead set the `DW_AT_GNU_dwo_name` to a
path relative to compiler's working directory. This still allows
debuggers to find the split dwarf files, while not changing the
behaviour of the code that is compiling with regular debug info, and not
changing the compiler's behaviour with regards to reproducibility.

Fixes #82074
</content>
</entry>
<entry>
<title>Replace const_cstr with cstr crate</title>
<updated>2021-02-13T22:45:35+00:00</updated>
<author>
<name>Xidorn Quan</name>
<email>me@upsuper.org</email>
</author>
<published>2021-02-13T11:17:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=38e4233a3291b0b8e3148e7ea47da66c9d8b307f'/>
<id>urn:sha1:38e4233a3291b0b8e3148e7ea47da66c9d8b307f</id>
<content type='text'>
</content>
</entry>
<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>
</feed>
