File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ const std = @import("std");
22
33pub fn build (b : * std.Build ) void {
44 const target = b .standardTargetOptions (.{});
5- const optimize = b .standardOptimizeOption (.{
6- .preferred_optimize_mode = .ReleaseFast ,
7- });
85
96 const options = .{
7+ .optimize = b .option (
8+ std .builtin .OptimizeMode ,
9+ "optimize" ,
10+ "The optimization level to use for the build" ,
11+ ) orelse .ReleaseFast ,
1012 .enable_cross_platform_determinism = b .option (
1113 bool ,
1214 "enable_cross_platform_determinism" ,
@@ -34,7 +36,7 @@ pub fn build(b: *std.Build) void {
3436 .name = "zmath-tests" ,
3537 .root_source_file = b .path ("src/root.zig" ),
3638 .target = target ,
37- .optimize = optimize ,
39+ .optimize = options . optimize ,
3840 });
3941 b .installArtifact (tests );
4042
@@ -48,7 +50,7 @@ pub fn build(b: *std.Build) void {
4850 .name = "zmath-benchmarks" ,
4951 .root_source_file = b .path ("src/benchmark.zig" ),
5052 .target = target ,
51- .optimize = optimize ,
53+ .optimize = options . optimize ,
5254 });
5355 b .installArtifact (benchmarks );
5456
You can’t perform that action at this time.
0 commit comments