From a542e635822025ea187ec93095464d46b6c9a6e2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 13 Mar 2025 09:14:29 -0700 Subject: [PATCH] pkg/gtk4-layer-shell: disable ubsan --- pkg/gtk4-layer-shell/build.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/gtk4-layer-shell/build.zig b/pkg/gtk4-layer-shell/build.zig index d1717e927..9ad12d7ab 100644 --- a/pkg/gtk4-layer-shell/build.zig +++ b/pkg/gtk4-layer-shell/build.zig @@ -111,6 +111,16 @@ fn buildLib(b: *std.Build, module: *std.Build.Module, options: anytype) !*std.Bu b.fmt("-DGTK_LAYER_SHELL_MAJOR={}", .{version.major}), b.fmt("-DGTK_LAYER_SHELL_MINOR={}", .{version.minor}), b.fmt("-DGTK_LAYER_SHELL_MICRO={}", .{version.patch}), + + // Zig 0.14 regression: this is required because building with + // ubsan results in unknown symbols. Bundling the ubsan/compiler + // RT doesn't help. I'm not sure what the root cause is but I + // suspect its related to this: + // https://github.com/ziglang/zig/issues/23052 + // + // We can remove this in the future for Zig updates and see + // if our binaries run in debug on NixOS. + "-fno-sanitize=undefined", }, });