msvc libc: provide _fltused symbol

master
Andrew Kelley 2019-07-17 18:11:03 -04:00
parent e816d592e8
commit aaa4bf75d3
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,10 @@ const is_wasm = switch (builtin.arch) {
.wasm32, .wasm64 => true,
else => false,
};
const is_msvc = switch (builtin.abi) {
.msvc => true,
else => false,
};
const is_freestanding = switch (builtin.os) {
.freestanding => true,
else => false,
@ -25,9 +29,13 @@ comptime {
@export("strncmp", strncmp, .Strong);
@export("strerror", strerror, .Strong);
@export("strlen", strlen, .Strong);
} else if (is_msvc) {
@export("_fltused", _fltused, .Strong);
}
}
extern var _fltused: c_int = 1;
extern fn main(argc: c_int, argv: [*][*]u8) c_int;
extern fn wasm_start() void {
_ = main(0, undefined);