Skip to content
Closed
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 .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "src/llvm"]
path = src/llvm
url = https://github.com/rust-lang/llvm.git
url = https://github.com/alexcrichton/llvm.git
branch = master
[submodule "src/jemalloc"]
path = src/jemalloc
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32))
extern {
#[lang = "panic_fmt"]
#[unwind]
fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32, col: u32) -> !;
fn rust_begin_unwind(fmt: fmt::Arguments, file: &'static str, line: u32, col: u32) -> !;
}
let (file, line, col) = *file_line_col;
unsafe { panic_impl(fmt, file, line, col) }
unsafe { rust_begin_unwind(fmt, file, line, col) }
}
28 changes: 22 additions & 6 deletions src/libpanic_abort/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,33 @@ pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 {
// runtime at all.
pub mod personalities {
#[no_mangle]
#[cfg(not(all(target_os = "windows",
target_env = "gnu",
target_arch = "x86_64")))]
#[cfg(not(all(
target_os = "windows",
any(
target_env = "msvc",
all(target_env = "gnu", target_arch = "x86_64")
)
)))]
pub extern fn rust_eh_personality() {}

// On x86_64-pc-windows-gnu we use our own personality function that needs
// to return `ExceptionContinueSearch` as we're passing on all our frames.
#[no_mangle]
#[cfg(all(target_os = "windows",
target_env = "gnu",
target_arch = "x86_64"))]
#[cfg(all(
target_os = "windows",
any(
target_env = "msvc",
all(target_env = "gnu", target_arch = "x86_64")
)
))]
#[cfg_attr(
all(target_env = "msvc", target_arch = "x86"),
export_name = "rust_seh32_personality"
)]
#[cfg_attr(
all(target_env = "msvc", target_arch = "x86_64"),
export_name = "rust_seh64_personality"
)]
pub extern fn rust_eh_personality(_record: usize,
_frame: usize,
_context: usize,
Expand Down
7 changes: 6 additions & 1 deletion src/libpanic_unwind/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ use core::raw;
pub use imp::eh_frame_registry::*;

// *-pc-windows-msvc
#[cfg(target_env = "msvc")]
#[cfg(all(target_env = "msvc", stage0))]
#[path = "seh_stage0.rs"]
mod imp;

// *-pc-windows-msvc
#[cfg(all(target_env = "msvc", not(stage0)))]
#[path = "seh.rs"]
mod imp;

Expand Down
Loading