Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ A project to implement GNU coreutils utilities in `C++` and `Zig`. This is an on

- `wc`: Word, line, and byte counting utility
- `true`: Do nothing, successfully (exit with status 0)
- `false`: Do nothing, unsuccessfully (exit with status 1)


## Planned Utilities

Expand Down
8 changes: 7 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ pub fn build(b: *std.Build) void {
}, &[_][]const u8{
"src/true",
}).build(b, optimize, target, &targets);


Executable.init("false", &[_][]const u8{
"src/false/main.cpp",
}, &[_][]const u8{
"src/false",
}).build(b, optimize, target, &targets);

zcc.createStep(b, "cdb", targets.toOwnedSlice() catch @panic("OOM"));
}
3 changes: 3 additions & 0 deletions src/false/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main(void) {
return 1;
}