File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,16 @@ pub fn build(b: *std.Build) void {
77 // for restricting supported target set are available.
88 const target = b .standardTargetOptions (.{});
99 // Standard optimization options allow the person running `zig build` to select
10- // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
11- // set a preferred release mode, allowing the user to decide how to optimize .
12- const optimize = b .standardOptimizeOption (.{});
10+ // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we default
11+ // to ReleaseFast for benchmark performance .
12+ const optimize = b .standardOptimizeOption (.{ . preferred_optimize_mode = .ReleaseFast });
1313
1414 const exe = b .addExecutable (.{
1515 .name = "app" ,
1616 .root_module = b .createModule (.{ .root_source_file = b .path ("app.zig" ) }),
1717 });
1818 exe .setTarget (target );
19- exe .setBuildMode (optimize );
19+ exe .setOptimizeMode (optimize );
2020 exe .linkLibC ();
2121 b .installArtifact (exe );
2222
You can’t perform that action at this time.
0 commit comments