@@ -2,15 +2,11 @@ const std = @import("std");
2
2
3
3
pub fn build (b : * std.Build ) void {
4
4
const target = b .standardTargetOptions (.{});
5
+ const optimize = b .standardOptimizeOption (.{
6
+ .preferred_optimize_mode = .ReleaseFast ,
7
+ });
5
8
6
9
const options = .{
7
- .optimize = b .option (
8
- std .builtin .OptimizeMode ,
9
- "optimize" ,
10
- "Select optimization mode" ,
11
- ) orelse b .standardOptimizeOption (.{
12
- .preferred_optimize_mode = .ReleaseFast ,
13
- }),
14
10
.enable_cross_platform_determinism = b .option (
15
11
bool ,
16
12
"enable_cross_platform_determinism" ,
@@ -38,7 +34,7 @@ pub fn build(b: *std.Build) void {
38
34
.name = "zmath-tests" ,
39
35
.root_source_file = b .path ("src/root.zig" ),
40
36
.target = target ,
41
- .optimize = options . optimize ,
37
+ .optimize = optimize ,
42
38
});
43
39
b .installArtifact (tests );
44
40
@@ -52,7 +48,7 @@ pub fn build(b: *std.Build) void {
52
48
.name = "zmath-benchmarks" ,
53
49
.root_source_file = b .path ("src/benchmark.zig" ),
54
50
.target = target ,
55
- .optimize = options . optimize ,
51
+ .optimize = optimize ,
56
52
});
57
53
b .installArtifact (benchmarks );
58
54
0 commit comments