enable nontrapping fptoint feature in c and zig example

This commit is contained in:
2022-01-02 16:06:01 +01:00
parent d239775411
commit acea5cb6e0
3 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,11 @@ pub fn build(b: *std.build.Builder) void {
const lib = b.addSharedLibrary("cart", "main.zig", .unversioned);
lib.setBuildMode(mode);
lib.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding });
lib.setTarget(.{
.cpu_arch = .wasm32,
.os_tag = .freestanding,
.cpu_features_add = std.Target.wasm.featureSet(&.{ .nontrapping_fptoint })
});
lib.import_memory = true;
lib.initial_memory = 262144;
lib.max_memory = 262144;