Skip to content

Commit ffbb234

Browse files
committed
build.zig: Platform-agnostic paths
1 parent cac24b7 commit ffbb234

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

build.zig

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ pub fn build(b: *std.Build) void {
1313
pub fn emccPath(b: *std.Build) []const u8 {
1414
return std.fs.path.join(b.allocator, &.{
1515
b.dependency("emsdk", .{}).path("").getPath(b),
16-
"upstream/emscripten/",
16+
"upstream",
17+
"emscripten",
1718
switch (builtin.target.os.tag) {
1819
.windows => "emcc.bat",
1920
else => "emcc",
@@ -24,7 +25,8 @@ pub fn emccPath(b: *std.Build) []const u8 {
2425
pub fn emrunPath(b: *std.Build) []const u8 {
2526
return std.fs.path.join(b.allocator, &.{
2627
b.dependency("emsdk", .{}).path("").getPath(b),
27-
"upstream/emscripten/",
28+
"upstream",
29+
"emscripten",
2830
switch (builtin.target.os.tag) {
2931
.windows => "emrun.bat",
3032
else => "emrun",
@@ -35,7 +37,10 @@ pub fn emrunPath(b: *std.Build) []const u8 {
3537
pub fn htmlPath(b: *std.Build) []const u8 {
3638
return std.fs.path.join(b.allocator, &.{
3739
b.dependency("emsdk", .{}).path("").getPath(b),
38-
"upstream/emscripten/src/shell.html",
40+
"upstream",
41+
"emscripten",
42+
"src",
43+
"shell.html",
3944
}) catch unreachable;
4045
}
4146

0 commit comments

Comments
 (0)