diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-13 18:34:52 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-13 17:24:32 -0400 |
| commit | 1b222cb1ff6b95be2f8b03a0ae872efcc7873aa6 (patch) | |
| tree | 9ffd4e7e0de10d115de9498efbd30198076e83da /lib/std/start.zig | |
| parent | 402264ab0e16dfdc98e861a440df9ef5db35c402 (diff) | |
| download | zig-1b222cb1ff6b95be2f8b03a0ae872efcc7873aa6.tar.gz zig-1b222cb1ff6b95be2f8b03a0ae872efcc7873aa6.zip | |
start.zig: export main with strong linkage
Unmarks `_main` as weak symbol making it global (the entire linked
program) in scope.
Diffstat (limited to 'lib/std/start.zig')
| -rw-r--r-- | lib/std/start.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index e1e331a682..e3983db8b4 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -40,7 +40,7 @@ comptime { } else if (builtin.output_mode == .Exe or @hasDecl(root, "main")) { if (builtin.link_libc and @hasDecl(root, "main")) { if (@typeInfo(@TypeOf(root.main)).Fn.calling_convention != .C) { - @export(main, .{ .name = "main", .linkage = .Weak }); + @export(main, .{ .name = "main" }); } } else if (builtin.os.tag == .windows) { if (!@hasDecl(root, "WinMain") and !@hasDecl(root, "WinMainCRTStartup") and |
