| ... | ... | @@ -12,6 +12,10 @@ const is_wasm = switch (builtin.arch) { |
| 12 | 12 | .wasm32, .wasm64 => true, |
| 13 | 13 | else => false, |
| 14 | 14 | }; |
| 15 | const is_msvc = switch (builtin.abi) { |
| 16 | .msvc => true, |
| 17 | else => false, |
| 18 | }; |
| 15 | 19 | const is_freestanding = switch (builtin.os) { |
| 16 | 20 | .freestanding => true, |
| 17 | 21 | else => false, |
| ... | ... | @@ -25,9 +29,13 @@ comptime { |
| 25 | 29 | @export("strncmp", strncmp, .Strong); |
| 26 | 30 | @export("strerror", strerror, .Strong); |
| 27 | 31 | @export("strlen", strlen, .Strong); |
| 32 | } else if (is_msvc) { |
| 33 | @export("_fltused", _fltused, .Strong); |
| 28 | 34 | } |
| 29 | 35 | } |
| 30 | 36 | |
| 37 | extern var _fltused: c_int = 1; |
| 38 | |
| 31 | 39 | extern fn main(argc: c_int, argv: [*][*]u8) c_int; |
| 32 | 40 | extern fn wasm_start() void { |
| 33 | 41 | _ = main(0, undefined); |