From 87b4bba7f5b25a8c8c5c0ca8bb336237f2fa4931 Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Thu, 23 Jul 2026 20:17:02 +0200 Subject: [PATCH 1/2] Add an option to use the thread sanitizer --- build.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 7ad5deab55..28a50cb613 100644 --- a/build.zig +++ b/build.zig @@ -217,6 +217,7 @@ pub fn build(b: *std.Build) !void { const options = b.addOptions(); const isRelease = b.option(bool, "release", "Removes the -dev flag from the version") orelse false; + const sanitizeThread = b.option(bool, "sanitizeThread", "enables the builtin thread sanitizer"); const version = b.fmt("0.4.0{s}", .{if (isRelease) "" else "-dev"}); if (b.option([]const u8, "version", "used by the CI to check if the git tag and game version match")) |tagVersion| { const tagVersionUpperbound: usize = std.mem.indexOfScalar(u8, tagVersion, '-') orelse tagVersion.len; @@ -251,12 +252,13 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, .link_libc = true, .link_libcpp = true, + .sanitize_thread = sanitizeThread, }); const exe = b.addExecutable(.{ .name = "Cubyz", .root_module = mainModule, - //.sanitize_thread = true, + .use_llvm = if (sanitizeThread orelse false) true else null, }); exe.root_module.addOptions("build_options", options); exe.root_module.addImport("main", mainModule); From a89103e61124b57d4bfc5db23165508dd7065e9d Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Fri, 24 Jul 2026 20:27:41 +0200 Subject: [PATCH 2/2] Update dependencies --- build.zig.zon | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 31e551f62e..50006fd43e 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -9,36 +9,36 @@ .lazy = true, }, .cubyz_deps_headers = .{ - .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/12/cubyz_deps_headers.tar.gz", + .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/13/cubyz_deps_headers.tar.gz", .hash = "N-V-__8AAB6xcQAzOlBtWsr0BKq1iJr81QNqsMJiRqbFdLQu", }, .cubyz_deps_aarch64_macos = .{ - .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/12/cubyz_deps_aarch64-macos-none.tar.gz", + .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/13/cubyz_deps_aarch64-macos-none.tar.gz", .hash = "N-V-__8AABoInwXLwZD4LGu6NHUWDHqZhtFV7M_75BLg8S2c", .lazy = true, }, .cubyz_deps_aarch64_linux = .{ - .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/12/cubyz_deps_aarch64-linux-musl.tar.gz", - .hash = "N-V-__8AAIJB3QJEfQMtQipbSUYSoSwVtixb8VNey8r84yxq", + .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/13/cubyz_deps_aarch64-linux-musl.tar.gz", + .hash = "N-V-__8AAOio3AI_pHjtVBD_94slTljtHL0mGrW7Sl2UGF-J", .lazy = true, }, .cubyz_deps_aarch64_windows = .{ - .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/12/cubyz_deps_aarch64-windows-gnu.tar.gz", + .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/13/cubyz_deps_aarch64-windows-gnu.tar.gz", .hash = "N-V-__8AAJzA9ALZU9f_NM0T71V-wj3sJDU1uILlmAV19hSO", .lazy = true, }, .cubyz_deps_x86_64_macos = .{ - .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/12/cubyz_deps_x86_64-macos-none.tar.gz", + .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/13/cubyz_deps_x86_64-macos-none.tar.gz", .hash = "N-V-__8AADBWkAWFax-EOLwiNC4EQpU4u6suCzlW3FemTrXT", .lazy = true, }, .cubyz_deps_x86_64_linux = .{ - .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/12/cubyz_deps_x86_64-linux-musl.tar.gz", - .hash = "N-V-__8AAFAX2AJMXYC4zzXanosSctAE1E2xiJLuY92qa17Z", + .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/13/cubyz_deps_x86_64-linux-musl.tar.gz", + .hash = "N-V-__8AAH4n3wJ0SZsa_ZmB05n5yoVQypRWawMYBqJCxkXl", .lazy = true, }, .cubyz_deps_x86_64_windows = .{ - .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/12/cubyz_deps_x86_64-windows-gnu.tar.gz", + .url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/13/cubyz_deps_x86_64-windows-gnu.tar.gz", .hash = "N-V-__8AAHITFwPGSkpkm-6reDqNtW9R1xRx_hzZnZdILhCu", .lazy = true, },