Skip to content

Commit

Permalink
[ fix-crash-caused-by-zig-build ] - Fixed 'Illegal instruction' crash…
Browse files Browse the repository at this point in the history
… on 'rtextures' and 'raudio' model that caused by zig build. (#3682)
  • Loading branch information
wisonye authored Dec 28, 2023
1 parent ad64a43 commit 1727ddb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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, &.{
Expand All @@ -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();
Expand Down

0 comments on commit 1727ddb

Please sign in to comment.