diff --git a/build.zig b/build.zig index da40ecc..2d9e56d 100644 --- a/build.zig +++ b/build.zig @@ -30,6 +30,11 @@ pub fn build(b: *std.Build) void { "shared", "Build JoltC as shared lib", ) orelse false, + .no_exceptions = b.option( + bool, + "no_exceptions", + "Disable C++ Exceptions", + ) orelse false, }; const options_step = b.addOptions(); @@ -80,6 +85,7 @@ pub fn build(b: *std.Build) void { if (options.enable_debug_renderer) "-DJPH_DEBUG_RENDERER" else "", if (options.use_double_precision) "-DJPH_DOUBLE_PRECISION" else "", if (options.enable_asserts) "-DJPH_ENABLE_ASSERTS" else "", + if (options.no_exceptions) "-fno-exceptions" else "", "-fno-access-control", "-fno-sanitize=undefined", };