From d9f3ef983b7021417cc91bd5788cd925ca06aa83 Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Mon, 3 Jun 2024 11:51:10 +0200 Subject: [PATCH] update Emscripten SDK to 3.1.61 --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- build.zig | 3 +++ build.zig.zon | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f02a45..e8d468b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ to the example code or the supported Zig version. For actual Sokol header changes, see the [sokol changelog](https://github.com/floooh/sokol/blob/master/CHANGELOG.md). +### 03-Jun-2024 + +- the Emscripten SDK dependency has been updated to 3.1.61 +- the Emscripten specific parts of build.zig have been updated to be more + 'idiomatic' now. This also has the nice side effect that the dirty check for + the Emscripten linker step now works as expected (e.g. the step will do + nothing if the output is uptodate) + ### 01-Jun-2024 - added bindings for sokol_imgui.h (please read the section `## Dear ImGui support` diff --git a/README.md b/README.md index bc104be..fc7149a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ zig build run-debugtext-userfont zig build run-shapes ``` -(also run ```zig build --help``` to inspect the build targets) +(also run ```zig build -l``` to get a list of build targets) By default, the backend 3D API will be selected based on the target platform: diff --git a/build.zig b/build.zig index 98e8186..d864ba7 100644 --- a/build.zig +++ b/build.zig @@ -416,6 +416,9 @@ fn createEmsdkStep(b: *Build, emsdk: *Build.Dependency) *Build.Step.Run { // NOTE 2: the file exists check is a bit hacky, it would be cleaner // to build an on-the-fly helper tool which takes care of the SDK // setup and just does nothing if it already happened +// NOTE 3: this code works just fine when the SDK version is updated in build.zig.zon +// since this will be cloned into a new zig cache directory which doesn't have +// an .emscripten file yet until the one-time setup. fn emSdkSetupStep(b: *Build, emsdk: *Build.Dependency) !?*Build.Step.Run { const dot_emsc_path = emSdkLazyPath(b, emsdk, &.{".emscripten"}).getPath(b); const dot_emsc_exists = !std.meta.isError(std.fs.accessAbsolute(dot_emsc_path, .{})); diff --git a/build.zig.zon b/build.zig.zon index a05bb51..c962e28 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -11,8 +11,8 @@ }, .dependencies = .{ .emsdk = .{ - .url = "git+https://github.com/emscripten-core/emsdk#176dec4875db4d74c2038d7e8af3395be38d222c", - .hash = "122034cf4aca9f97fea3c34f3e9fe92e56f08e2160efe3c95d7ec89260e621426a81", + .url = "git+https://github.com/emscripten-core/emsdk#3.1.61", + .hash = "12200ba39d83227f5de08287b043b011a2eb855cdb077f4b165edce30564ba73400e", }, }, }