diff options
Diffstat (limited to 'std/bootstrap.zig')
| -rw-r--r-- | std/bootstrap.zig | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/std/bootstrap.zig b/std/bootstrap.zig index f520834654..074f06557e 100644 --- a/std/bootstrap.zig +++ b/std/bootstrap.zig @@ -1,17 +1,16 @@ // This file is in a package which has the root source file exposed as "@root". +// It is included in the compilation unit when exporting an executable. const root = @import("@root"); const std = @import("std"); -const want_start_symbol = switch(@compileVar("os")) { - Os.linux => true, - else => false, -}; -const want_main_symbol = !want_start_symbol; +const want_main_symbol = std.build.linkingLibrary("c"); +const want_start_symbol = !want_main_symbol; const exit = switch(@compileVar("os")) { Os.linux => std.linux.exit, Os.darwin => std.darwin.exit, + else => @compileError("Unsupported OS"), }; var argc: usize = undefined; |
