only export __chkstk for windows

it's a windows only function anyway
This commit is contained in:
Andrew Kelley 2017-08-31 20:10:24 -04:00
parent e93ece7514
commit 06b64d82bf

View File

@ -101,6 +101,7 @@ export nakedcc fn __aeabi_uidivmod() {
export nakedcc fn __chkstk() { export nakedcc fn __chkstk() {
@setDebugSafety(this, false); @setDebugSafety(this, false);
if (comptime builtin.os == builtin.Os.windows) {
if (comptime builtin.arch == builtin.Arch.x86_64) { if (comptime builtin.arch == builtin.Arch.x86_64) {
asm volatile ( asm volatile (
\\ push %%rcx \\ push %%rcx
@ -126,6 +127,7 @@ export nakedcc fn __chkstk() {
); );
unreachable; unreachable;
} }
}
@setGlobalLinkage(__chkstk, builtin.GlobalLinkage.Internal); @setGlobalLinkage(__chkstk, builtin.GlobalLinkage.Internal);
} }