diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-02-26 18:10:40 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-02-26 18:10:40 -0500 |
| commit | 4563f6b4242957971d619aa23263938fdcb442d3 (patch) | |
| tree | 02e921db4e1885b2b7ff21a0158a6bc09fc32abc /std | |
| parent | 6365f5a9f3f60c1a65f91dcf2926fefee4228b21 (diff) | |
| download | zig-4563f6b4242957971d619aa23263938fdcb442d3.tar.gz zig-4563f6b4242957971d619aa23263938fdcb442d3.zip | |
add builder.addFmt API and use it to test stage1 zig fmt
closes #1968
Diffstat (limited to 'std')
| -rw-r--r-- | std/build.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/std/build.zig b/std/build.zig index e90d827602..e3fdfbccee 100644 --- a/std/build.zig +++ b/std/build.zig @@ -15,6 +15,8 @@ const BufSet = std.BufSet; const BufMap = std.BufMap; const fmt_lib = std.fmt; +pub const FmtStep = @import("build/fmt.zig").FmtStep; + pub const Builder = struct { uninstall_tls: TopLevelStep, install_tls: TopLevelStep, @@ -205,6 +207,10 @@ pub const Builder = struct { return remove_dir_step; } + pub fn addFmt(self: *Builder, paths: []const []const u8) *FmtStep { + return FmtStep.create(self, paths); + } + pub fn version(self: *const Builder, major: u32, minor: u32, patch: u32) Version { return Version{ .major = major, |
