Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ fix-crash-caused-by-zig-build ] - Fixed 'Illegal instruction' crash on 'rtextures' and 'raudio' model that caused by zig build. #3682

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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