diff options
| author | Manlio Perillo <[email protected]> | 2023-05-06 18:18:08 +0200 |
|---|---|---|
| committer | Manlio Perillo <[email protected]> | 2023-05-06 18:18:08 +0200 |
| commit | 3f81cdf3acac59ff1be0932c9419f681f6707c08 (patch) | |
| tree | 209d0aba225ba9544eba94cac033a1006d599230 /build.zig | |
| parent | 1dd5852bec6fb72ebb1b712c7a78425dcc015390 (diff) | |
| download | ziglings-3f81cdf3acac59ff1be0932c9419f681f6707c08.tar.xz ziglings-3f81cdf3acac59ff1be0932c9419f681f6707c08.zip | |
build: improve Exercise.addExecutable
Replace the file_path variable with path.
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -63,12 +63,12 @@ pub const Exercise = struct { /// Returns the CompileStep for this exercise. pub fn addExecutable(self: Exercise, b: *Build, work_path: []const u8) *CompileStep { - const file_path = join(b.allocator, &.{ work_path, self.main_file }) catch + const path = join(b.allocator, &.{ work_path, self.main_file }) catch @panic("OOM"); return b.addExecutable(.{ .name = self.name(), - .root_source_file = .{ .path = file_path }, + .root_source_file = .{ .path = path }, .link_libc = self.link_libc, }); } |
