emcc: Fix build (#155)
This commit is contained in:
parent
c94e68d872
commit
1224eb2290
1 changed files with 11 additions and 3 deletions
14
emcc.zig
14
emcc.zig
|
|
@ -11,11 +11,15 @@ pub fn emscriptenRunStep(b: *std.Build) !*std.Build.Step.Run {
|
|||
.windows => "emrun.bat",
|
||||
else => "emrun",
|
||||
};
|
||||
const emrun_run_arg = try b.allocator.alloc(u8, b.sysroot.?.len + emrunExe.len + 1);
|
||||
var emrun_run_arg = try b.allocator.alloc(u8, b.sysroot.?.len + emrunExe.len + 1);
|
||||
defer b.allocator.free(emrun_run_arg);
|
||||
|
||||
if (b.sysroot == null) {
|
||||
emrun_run_arg = emrunExe;
|
||||
emrun_run_arg = try std.fmt.bufPrint(
|
||||
emrun_run_arg,
|
||||
"{s}",
|
||||
.{ emrunExe }
|
||||
);
|
||||
} else {
|
||||
emrun_run_arg = try std.fmt.bufPrint(
|
||||
emrun_run_arg,
|
||||
|
|
@ -74,7 +78,11 @@ pub fn linkWithEmscripten(
|
|||
defer b.allocator.free(emcc_run_arg);
|
||||
|
||||
if (b.sysroot == null) {
|
||||
emcc_run_arg = emccExe;
|
||||
emcc_run_arg = try std.fmt.bufPrint(
|
||||
emcc_run_arg,
|
||||
"{s}",
|
||||
.{ emccExe }
|
||||
);
|
||||
} else {
|
||||
emcc_run_arg = try std.fmt.bufPrint(
|
||||
emcc_run_arg,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue