@@ -60,12 +60,6 @@ pub fn activateEmsdkStep(b: *std.Build) *std.Build.Step {
60
60
var emsdk_activate = b .addSystemCommand (&.{ emsdk_script_path , "activate" , emsdk_version });
61
61
emsdk_activate .step .dependOn (& emsdk_install .step );
62
62
63
- const chmod_emcc = b .addSystemCommand (&.{ "chmod" , "+x" , emccPath (b ) });
64
- chmod_emcc .step .dependOn (& emsdk_activate .step );
65
-
66
- const chmod_emrun = b .addSystemCommand (&.{ "chmod" , "+x" , emrunPath (b ) });
67
- chmod_emrun .step .dependOn (& emsdk_activate .step );
68
-
69
63
const step = b .allocator .create (std .Build .Step ) catch unreachable ;
70
64
step .* = std .Build .Step .init (.{
71
65
.id = .custom ,
@@ -75,8 +69,21 @@ pub fn activateEmsdkStep(b: *std.Build) *std.Build.Step {
75
69
fn make (_ : * std.Build.Step , _ : std.Build.Step.MakeOptions ) anyerror ! void {}
76
70
}.make ,
77
71
});
78
- step .dependOn (& chmod_emcc .step );
79
- step .dependOn (& chmod_emrun .step );
72
+
73
+ switch (builtin .target .os .tag ) {
74
+ .linux , .macos = > {
75
+ const chmod_emcc = b .addSystemCommand (&.{ "chmod" , "+x" , emccPath (b ) });
76
+ chmod_emcc .step .dependOn (& emsdk_activate .step );
77
+
78
+ const chmod_emrun = b .addSystemCommand (&.{ "chmod" , "+x" , emrunPath (b ) });
79
+ chmod_emrun .step .dependOn (& emsdk_activate .step );
80
+
81
+ step .dependOn (& chmod_emcc .step );
82
+ step .dependOn (& chmod_emrun .step );
83
+ },
84
+ else = > {},
85
+ }
86
+
80
87
return step ;
81
88
}
82
89
@@ -165,7 +172,7 @@ pub fn emccStep(
165
172
166
173
emcc .addArtifactArg (wasm );
167
174
{
168
- for (wasm .root_module .import_table . values () ) | module | {
175
+ for (wasm .root_module .getGraph (). modules ) | module | {
169
176
for (module .link_objects .items ) | link_object | {
170
177
switch (link_object ) {
171
178
.other_step = > | compile_step | {
0 commit comments