aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-26 18:10:40 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-26 18:10:40 -0500
commit4563f6b4242957971d619aa23263938fdcb442d3 (patch)
tree02e921db4e1885b2b7ff21a0158a6bc09fc32abc /std
parent6365f5a9f3f60c1a65f91dcf2926fefee4228b21 (diff)
downloadzig-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.zig6
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,