Skip to content

Commit

Permalink
zig: disable_sanitize_c on all modes
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Dec 26, 2023
1 parent b235f83 commit 13fe97d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ pub fn buildSokol(b: *Builder, target: CrossTarget, optimize: OptimizeMode, conf
.target = target,
.optimize = optimize,
});
lib.disable_sanitize_c = true;
switch (optimize) {
// zig have custom compiler-rt and another toolchains not include it (fix: unknown ref zig_stack_protector)
.Debug, .ReleaseSafe => lib.bundle_compiler_rt = true,
else => lib.disable_sanitize_c = true,
else => lib.strip = true,
}
lib.pie = true;
lib.linkLibC();
Expand Down
6 changes: 3 additions & 3 deletions tools/zigcc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ pub fn main() !void {
var proc = std.ChildProcess.init(cmds.items, allocator);

// See all flags
std.debug.print("debug flags: ", .{});
for (cmds.items) |cmd|
std.debug.print("{s} ", .{cmd});
// std.debug.print("debug flags: ", .{});
// for (cmds.items) |cmd|
// std.debug.print("{s} ", .{cmd});

_ = try proc.spawnAndWait();
}

0 comments on commit 13fe97d

Please sign in to comment.