File tree 1 file changed +10
-7
lines changed 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1
1
const std = @import ("std" );
2
2
3
- pub fn build (b : * std.build.Builder ) void {
3
+ pub fn build (b : * std.Build ) void {
4
4
// Standard target options allows the person running `zig build` to choose
5
5
// what target to build for. Here we do not override the defaults, which
6
6
// means any target is allowed, and the default is native. Other options
7
7
// for restricting supported target set are available.
8
8
const target = b .standardTargetOptions (.{});
9
9
10
- // Standard release options allow the person running `zig build` to select
11
- // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
12
- const mode = b .standardReleaseOptions ( );
10
+ // Standard optimization options allow the person running `zig build`
11
+ // to select between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
12
+ const optimize = b .standardOptimizeOption (.{} );
13
13
14
- const exe = b .addExecutable ("user-map" , "src/main.zig" );
15
- exe .setTarget (target );
16
- exe .setBuildMode (mode );
14
+ const exe = b .addExecutable (.{
15
+ .name = "user-map" ,
16
+ .root_source_file = .{ .path = "src/main.zig" },
17
+ .target = target ,
18
+ .optimize = optimize ,
19
+ });
17
20
exe .install ();
18
21
19
22
const run_cmd = exe .run ();
You can’t perform that action at this time.
0 commit comments