aboutsummaryrefslogtreecommitdiff
path: root/lib/std/special
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-12-04 14:42:18 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-12-04 14:42:40 -0500
commit10e172b1d77619469653b0521d8f65604fa549c7 (patch)
tree28ab1c6f77f8cd51483ff1f58ce2c1a2b942675a /lib/std/special
parent44e896f613b8fa9b74e3fa992b265d8a5f052aad (diff)
downloadzig-10e172b1d77619469653b0521d8f65604fa549c7.tar.gz
zig-10e172b1d77619469653b0521d8f65604fa549c7.zip
add `other` OS and fix regression in build-exe for freestanding
Diffstat (limited to 'lib/std/special')
-rw-r--r--lib/std/special/start.zig14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/std/special/start.zig b/lib/std/special/start.zig
index a93b01c290..9c24e38137 100644
--- a/lib/std/special/start.zig
+++ b/lib/std/special/start.zig
@@ -32,14 +32,16 @@ comptime {
if (!@hasDecl(root, "WinMain") and !@hasDecl(root, "WinMainCRTStartup")) {
@export("WinMainCRTStartup", WinMainCRTStartup, .Strong);
}
- } else if (is_wasm and builtin.os == .freestanding) {
- if (!@hasDecl(root, "_start")) @export("_start", wasm_freestanding_start, .Strong);
} else if (builtin.os == .uefi) {
if (!@hasDecl(root, "EfiMain")) @export("EfiMain", EfiMain, .Strong);
- } else if (is_mips) {
- if (!@hasDecl(root, "__start")) @export("__start", _start, .Strong);
- } else {
- if (!@hasDecl(root, "_start")) @export("_start", _start, .Strong);
+ } else if (builtin.os != .freestanding) {
+ if (is_mips) {
+ if (!@hasDecl(root, "__start")) @export("__start", _start, .Strong);
+ } else {
+ if (!@hasDecl(root, "_start")) @export("_start", _start, .Strong);
+ }
+ } else if (is_wasm) {
+ if (!@hasDecl(root, "_start")) @export("_start", wasm_freestanding_start, .Strong);
}
}
}