Skip to content

Commit

Permalink
🔧 Move release mode to build.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
segersniels committed Mar 30, 2024
1 parent 29b934b commit fcdd874
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/cli/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ pub fn build(b: *std.Build) !void {
// Standard optimization options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
const optimize = b.standardOptimizeOption(.{
.preferred_optimize_mode = .ReleaseSafe,
});

if (std.mem.eql(u8, is_ci_environment, "true")) {
for (targets) |t| {
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cli",
"scripts": {
"build": "zig build -Doptimize=ReleaseSafe --summary all",
"build": "zig build --summary all",
"build:ci": "CI=true npm run build",
"lint": "zig fmt --check ."
}
Expand Down

0 comments on commit fcdd874

Please sign in to comment.