From c13375cc9d7947a74f524b00ff37ce929242157e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Catarino=20Fran=C3=A7a?= Date: Sat, 20 Jan 2024 15:09:04 -0300 Subject: [PATCH] fix zig comp_rt --- build.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.zig b/build.zig index c8fa4f9..3cae595 100644 --- a/build.zig +++ b/build.zig @@ -62,6 +62,11 @@ pub fn buildLibSokol(b: *Build, options: LibSokolOptions) !*CompileStep { lib.linkLibC(); lib.root_module.root_source_file = .{ .path = "src/handmade/math.zig" }; + switch (options.optimize) { + .Debug, .ReleaseSafe => lib.bundle_compiler_rt = true, + else => lib.root_module.strip = true, + } + if (options.target.result.isWasm()) { // make sure we're building for the wasm32-emscripten target, not wasm32-freestanding if (lib.rootModuleTarget().os.tag != .emscripten) {