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

Add no-op eh_personality function to silence CI errors #142

Merged
merged 2 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ implementations of graphics functions, and the addition of missing libraries.
## Dependencies

To compile for the PSP, you will need a Rust **nightly** version equal to or
later than `2022-06-11` and the `rust-src` component. Please install Rust using
later than `2022-09-04` and the `rust-src` component. Please install Rust using
https://rustup.rs/

Use the following if you are new to Rust. (Feel free to set an override manually
Expand Down
6 changes: 3 additions & 3 deletions cargo-psp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ impl fmt::Display for CommitDate {
}
}

// Minimum 2022-06-11, remember to update both commit date and version too,
// Minimum 2022-09-03, remember to update both commit date and version too,
// below. Note that the `day` field lags by one day, as the toolchain always
// contains the previous days' nightly rustc.
const MINIMUM_COMMIT_DATE: CommitDate = CommitDate {
year: 2022,
month: 06,
day: 10,
month: 09,
day: 03,
};
const MINIMUM_RUSTC_VERSION: Version = Version {
major: 1,
Expand Down
2 changes: 1 addition & 1 deletion ci/concourse/build-rust-macos.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
platform: darwin

params:
RUSTUP_TOOLCHAIN: nightly-2022-06-11
RUSTUP_TOOLCHAIN: nightly-2022-09-04

inputs:
- name: repo
Expand Down
2 changes: 1 addition & 1 deletion ci/concourse/build-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image_resource:
tag: 1.44-slim

params:
RUSTUP_TOOLCHAIN: nightly-2022-06-11
RUSTUP_TOOLCHAIN: nightly-2022-09-04

inputs:
- name: repo
Expand Down
7 changes: 7 additions & 0 deletions psp/src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ pub fn catch_unwind<R, F: FnOnce() -> R>(f: F) -> Result<R, Box<dyn Any + Send>>
}
}

// TODO: EH personality was moved from the panic_unwind crate to std in
// https://github.com/rust-lang/rust/pull/92845. This no-op implementation
// should be replaced with the version from std when using no_std.
#[cfg(not(feature = "std"))]
#[lang = "eh_personality"]
unsafe extern "C" fn rust_eh_personality() {}

/// These symbols and functions should not actually be used. `libunwind`,
/// however, requires them to be present so that it can link.
// TODO: Patch these out of libunwind instead.
Expand Down