Skip to content

Commit 732af43

Browse files
committed
1. Remove unused function "getPath"
2. Use zig-style variable for buildvm_c_flags
1 parent 426b344 commit 732af43

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

build/luajit.zig

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.
123123
buildvm.step.dependOn(&dynasm_run.step);
124124
buildvm.step.dependOn(&genversion_run.step);
125125

126-
const buildvm_c_flags = switch (target.result.cpu.arch) {
127-
.aarch64, .aarch64_be => &[_][]const u8{ "-DLUAJIT_TARGET=LUAJIT_ARCH_arm64", "-DLJ_ARCH_HASFPU=1", "-DLJ_ABI_SOFTFP=0" },
128-
else => &[_][]const u8{},
126+
const buildvm_c_flags: []const []const u8 = switch (target.result.cpu.arch) {
127+
.aarch64, .aarch64_be => &.{ "-DLUAJIT_TARGET=LUAJIT_ARCH_arm64", "-DLJ_ARCH_HASFPU=1", "-DLJ_ABI_SOFTFP=0" },
128+
else => &.{},
129129
};
130130

131131
buildvm.addCSourceFiles(.{
@@ -243,11 +243,6 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin.
243243
return lib;
244244
}
245245

246-
fn getPath(lazy_path: Build.LazyPath, src_builder: *Build, asking_step: ?*Step) []const u8 {
247-
const p = lazy_path.getPath3(src_builder, asking_step);
248-
return src_builder.pathResolve(&.{ p.root_dir.path orelse ".", p.sub_path });
249-
}
250-
251246
const luajit_lib = [_][]const u8{
252247
"src/lib_base.c",
253248
"src/lib_math.c",

0 commit comments

Comments
 (0)