1

Do not strip debuginfo by default for MSVC by Kobzol · Pull Request #13630 · rus...

 1 month ago
source link: https://github.com/rust-lang/cargo/pull/13630
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

Contributor

This PR disables the logic which enables debuginfo stripping by default in release mode (#13257) for MSVC, since it causes problems there (rust-lang/rust#122857).

I'm not sure if this is the correct way to gate the logic on a specific target triple.

The root of the issue is that -Cstrip=debuginfo currently behaves like -Cstrip=symbols on MSVC, which causes the original optimization to break backtraces on Windows. Ultimately, this should probably be fixed in rustc, but that might take some further design work, therefore a faster solution would be to just special case this in Cargo for now, and remove the special case later, once it gets fixed on the rustc side.

Related issue: rust-lang/rust#122857


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK