Skip to content

Commit 6f06ea4

Browse files
committed
remove old make 0.13.0 support
1 parent 94c6837 commit 6f06ea4

File tree

2 files changed

+6
-36
lines changed

2 files changed

+6
-36
lines changed

src/androidbuild/builtin_options_update.zig

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@ options: *Options,
1919
package_name_stdout: LazyPath,
2020

2121
pub fn create(owner: *std.Build, options: *Options, package_name_stdout: LazyPath) void {
22-
const builtin_options_update = owner.allocator.create(@This()) catch @panic("OOM");
22+
const builtin_options_update = owner.allocator.create(BuiltinOptionsUpdate) catch @panic("OOM");
2323
builtin_options_update.* = .{
2424
.step = Step.init(.{
2525
.id = base_id,
2626
.name = androidbuild.runNameContext("builtin_options_update"),
2727
.owner = owner,
28-
.makeFn = comptime if (std.mem.eql(u8, builtin.zig_version_string, "0.13.0"))
29-
make013
30-
else
31-
makeLatest,
28+
.makeFn = make,
3229
}),
3330
.options = options,
3431
.package_name_stdout = package_name_stdout,
@@ -39,21 +36,9 @@ pub fn create(owner: *std.Build, options: *Options, package_name_stdout: LazyPat
3936
package_name_stdout.addStepDependencies(&builtin_options_update.step);
4037
}
4138

42-
/// make for zig 0.13.0
43-
fn make013(step: *Step, prog_node: std.Progress.Node) !void {
44-
_ = prog_node; // autofix
45-
try make(step);
46-
}
47-
48-
/// make for zig 0.14.0+
49-
fn makeLatest(step: *Step, options: Build.Step.MakeOptions) !void {
50-
_ = options; // autofix
51-
try make(step);
52-
}
53-
54-
fn make(step: *Step) !void {
39+
fn make(step: *Step, _: Build.Step.MakeOptions) !void {
5540
const b = step.owner;
56-
const builtin_options_update: *@This() = @fieldParentPtr("step", step);
41+
const builtin_options_update: *BuiltinOptionsUpdate = @fieldParentPtr("step", step);
5742
const options = builtin_options_update.options;
5843

5944
const package_name_path = builtin_options_update.package_name_stdout.getPath2(b, step);

src/androidbuild/d8glob.zig

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ pub fn create(owner: *std.Build, run: *Run, dir: LazyPath) void {
3131
.id = base_id,
3232
.name = androidbuild.runNameContext("d8glob"),
3333
.owner = owner,
34-
.makeFn = comptime if (std.mem.eql(u8, builtin.zig_version_string, "0.13.0"))
35-
make013
36-
else
37-
makeLatest,
34+
.makeFn = make,
3835
}),
3936
.run = run,
4037
.dir = dir,
@@ -45,19 +42,7 @@ pub fn create(owner: *std.Build, run: *Run, dir: LazyPath) void {
4542
dir.addStepDependencies(&glob.step);
4643
}
4744

48-
/// make for zig 0.13.0
49-
fn make013(step: *Step, prog_node: std.Progress.Node) !void {
50-
_ = prog_node; // autofix
51-
try make(step);
52-
}
53-
54-
/// make for zig 0.14.0+
55-
fn makeLatest(step: *Step, options: Build.Step.MakeOptions) !void {
56-
_ = options; // autofix
57-
try make(step);
58-
}
59-
60-
fn make(step: *Step) !void {
45+
fn make(step: *Step, _: Build.Step.MakeOptions) !void {
6146
const b = step.owner;
6247
const arena = b.allocator;
6348
const glob: *@This() = @fieldParentPtr("step", step);

0 commit comments

Comments
 (0)