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

Implement ARM personality routine in Rust. #35032

Merged
merged 1 commit into from
Jul 30, 2016
Merged

Conversation

vadimcn
Copy link
Contributor

@vadimcn vadimcn commented Jul 25, 2016

Remove the eh_personality_catch lang item.
Use a simplified version of cfg_if! in libunwind.

Closes #34786

Remove the `eh_personality_catch` lang item.
Use a simplified version of `cfg_if!` in libunwind.
@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@vadimcn
Copy link
Contributor Author

vadimcn commented Jul 25, 2016

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned aturon Jul 25, 2016
}

#[inline]
pub unsafe fn _Unwind_RaiseException(exc: *mut _Unwind_Exception) -> _Unwind_Reason_Code {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe #[link_name] could be used to rename this at the binding site?

@alexcrichton
Copy link
Member

You're a hero @vadimcn! Thanks! I just have one small nit but otherwise this looks good to me, although I didn't review the referenced documentation too closely to ensure it matches semantics. We've got CI for this at least on Android, and I also trust you, so...

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 25, 2016

📌 Commit 6cef93d has been approved by alexcrichton

// lives in seh64_gnu.rs
#[cfg(all(any(target_os = "ios", not(target_arch = "arm"))))]
#[lang = "eh_personality"]
#[no_mangle]
Copy link
Member

Choose a reason for hiding this comment

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

Preexisting, but why is it a lang item and a no_mangle? It being a lang item already decides the symbol for it, no_mangle notwithstanding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rust_eh_personality is a "weak" lang item, which means that if it is not defined in the current crate, the compiler will create an external symbol declaration rather than emitting an error. The symbol is then resolved by the linker.
This is what allows libcore to use panics, even though the personality routine is defined later in crate dependency chain.

@bors
Copy link
Contributor

bors commented Jul 26, 2016

⌛ Testing commit 6cef93d with merge e8d48b4...

@bors
Copy link
Contributor

bors commented Jul 26, 2016

💔 Test failed - auto-win-msvc-64-opt

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Jul 26, 2016 at 3:50 AM, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt/builds/5079


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#35032 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95PYTEv2XeLpYNeHkPrWOSUMh9T03ks5qZeZlgaJpZM4JUUrN
.

@alexcrichton
Copy link
Member

@bors: retry

1 similar comment
@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Jul 30, 2016

⌛ Testing commit 6cef93d with merge eab1b6b...

@bors
Copy link
Contributor

bors commented Jul 30, 2016

⛄ The build was interrupted to prioritize another pull request.

@bors
Copy link
Contributor

bors commented Jul 30, 2016

⌛ Testing commit 6cef93d with merge 2ad98a0...

bors added a commit that referenced this pull request Jul 30, 2016
Implement ARM personality routine in Rust.

Remove the `eh_personality_catch` lang item.
Use a simplified version of `cfg_if!` in libunwind.

Closes #34786
@bors bors merged commit 6cef93d into rust-lang:master Jul 30, 2016
jakllsch added a commit to jakllsch/rust that referenced this pull request Aug 4, 2016
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.

6 participants