Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes and cleanup #726

Merged
merged 2 commits into from
Aug 21, 2021
Merged

Various fixes and cleanup #726

merged 2 commits into from
Aug 21, 2021

Conversation

khyperia
Copy link
Contributor

While working on other patches that ended up not being applicable, I've gathered these changes unrelated to the irrelevant patch. So, submitting them as a seperate change, since the bigger change isn't going in.

While working on other patches that ended up not being applicable, I've
gathered these changes unrelated to the irrelevant patch. So, submitting
them as a seperate change, since the bigger change isn't going in.
@khyperia khyperia requested a review from eddyb as a code owner August 18, 2021 07:28
Comment on lines 623 to 637
pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
// Override rustc's panic hook with our own to override the ICE error
// message, and direct people to `rust-gpu`.
std::panic::set_hook(Box::new(|panic_info| {
rustc_driver::report_ice(
panic_info,
"https://github.com/EmbarkStudios/rust-gpu/issues/new",
);
eprintln!("note: `rust-gpu` version {}\n", env!("CARGO_PKG_VERSION"));
}));
// Setting the hook nukes the backtrace, so give developers an escape hatch to see the crash,
// even if the message is wrong.
// TODO: Figure out a way to print both the backtrace and override the bug report URL.
if env::var_os("NO_PANIC_HOOK").is_none() {
// Override rustc's panic hook with our own to override the ICE error
// message, and direct people to `rust-gpu`.
std::panic::set_hook(Box::new(|panic_info| {
rustc_driver::report_ice(
panic_info,
"https://github.com/EmbarkStudios/rust-gpu/issues/new",
);
eprintln!("note: `rust-gpu` version {}\n", env!("CARGO_PKG_VERSION"));
}));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be dropped now, or at least after #732 lands.

@khyperia khyperia requested a review from eddyb August 20, 2021 08:41
@eddyb eddyb enabled auto-merge (rebase) August 20, 2021 08:42
auto-merge was automatically disabled August 20, 2021 09:19

Rebase failed

@khyperia khyperia merged commit 1e3881b into main Aug 21, 2021
@khyperia khyperia deleted the various-cleanup branch August 21, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants