diff --git a/src/build.zig b/src/build.zig index 12d4a7a582b4..a574ad63255f 100644 --- a/src/build.zig +++ b/src/build.zig @@ -29,7 +29,9 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built if (options.raudio) { addCSourceFilesVersioned(raylib, &.{ srcdir ++ "/raudio.c", - }, raylib_flags); + }, &[_][]const u8{ + "-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/3674 + } ++ raylib_flags); } if (options.rmodels) { addCSourceFilesVersioned(raylib, &.{ @@ -51,7 +53,9 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built if (options.rtextures) { addCSourceFilesVersioned(raylib, &.{ srcdir ++ "/rtextures.c", - }, raylib_flags); + }, &[_][]const u8{ + "-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/3674 + } ++ raylib_flags); } var gen_step = b.addWriteFiles();