Skip to content

Commit

Permalink
fix zig comp_rt
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jan 20, 2024
1 parent 2f84bc8 commit c13375c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c13375c

Please sign in to comment.