Uh oh!
There was an error while loading. Please reload this page.
make backtrace = false compile for windows targets. - #44979
Conversation
rust-highfive
commented
Oct 2, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dtolnay (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
dtolnay
commented
Oct 3, 2017
bors
commented
Oct 3, 2017
📌 Commit a5296a5 has been approved by |
bors
commented
Oct 4, 2017
make `backtrace = false` compile for windows targets. when building for windows with `backtrace = false`, `libstd` fails to compile because some modules that use items from `sys_common::backtrace::*` are still included, even though those modules aren't used or referenced by anything. `sys_common::backtrace` doesn't exist when the backtrace feature is turned off. -- i've also added `#[cfg(feature = "backtrace")]` to various items that exist exclusively to support `mod backtrace` since the compilation would fail since they would be unused in a configuration with backtraces turned off.
bors
commented
Oct 4, 2017
☀️ Test successful - status-appveyor, status-travis |
Fix libstd compile error for windows-gnu targets without `backtrace` This is basically an addition to rust-lang#44979. Compiling `libstd` still fails when targeting `windows-gnu` with `panic = "abort"` because the items in the `...c::gnu` module are not used. They are only referenced from `backtrace_gnu.rs`, which is indirectly feature gated behind `backtrace` [here](https://github.com/rust-lang/rust/blob/9f3b09116b742b2606dc5f36f9145e0c89e4010b/src/libstd/sys/windows/mod.rs#L23).
when building for windows with
backtrace = false,libstdfails to compile because some modules that use items fromsys_common::backtrace::*are still included, even though those modules aren't used or referenced by anything.sys_common::backtracedoesn't exist when the backtrace feature is turned off.