Auto merge of #179 - ollie27:chkstk, r=alexcrichton

Don't include custom chkstk on MSVC

MSVC includes its own __chkstk so these aren't used.

These aren't included in compiler-rt: cb42103777/lib/builtins/CMakeLists.txt (L224-L284).
They also weren't included in compiler-builtins: 1685c92986/src/libcompiler_builtins/build.rs (L255-L293) until rust-lang/rust#42899.
This commit is contained in:
bors 2017-07-12 22:28:43 +00:00
commit f6c4034d59

View File

@ -8,7 +8,7 @@ use core::intrinsics;
// NOTE These functions are never mangled as they are not tested against compiler-rt
// and mangling ___chkstk would break the `jmp ___chkstk` instruction in __alloca
#[cfg(windows)]
#[cfg(all(windows, target_env = "gnu"))]
#[naked]
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
pub unsafe fn ___chkstk_ms() {
@ -32,7 +32,7 @@ pub unsafe fn ___chkstk_ms() {
intrinsics::unreachable();
}
#[cfg(windows)]
#[cfg(all(windows, target_env = "gnu"))]
#[naked]
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
pub unsafe fn __alloca() {
@ -41,7 +41,7 @@ pub unsafe fn __alloca() {
intrinsics::unreachable();
}
#[cfg(windows)]
#[cfg(all(windows, target_env = "gnu"))]
#[naked]
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
pub unsafe fn ___chkstk() {