Commit bbb96e112c

Takeshi Yoneda <takeshi@tetrate.io>
2021-08-21 03:17:22
build: allow specifying -mexec-model flag.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
1 parent f0176ee
Changed files (1)
lib
lib/std/build.zig
@@ -1432,6 +1432,7 @@ pub const LibExeObjStep = struct {
     single_threaded: bool,
     test_evented_io: bool = false,
     code_model: builtin.CodeModel = .default,
+    wasi_exec_model: ?builtin.WasiExecModel = null,
 
     root_src: ?FileSource,
     out_h_filename: []const u8,
@@ -2549,6 +2550,9 @@ pub const LibExeObjStep = struct {
             try zig_args.append("-mcmodel");
             try zig_args.append(@tagName(self.code_model));
         }
+        if (self.wasi_exec_model) |model| {
+            try zig_args.append(builder.fmt("-mexec-model={s}", .{@tagName(model)}));
+        }
 
         if (!self.target.isNative()) {
             try zig_args.append("-target");