aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-03-02 22:38:07 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-03-15 10:48:13 -0700
commitdcec4d55e36f48e459f4e8f218b8619d9be925db (patch)
tree0064e09c25715650b4e1ac641d5a33ec91245be1 /build.zig
parent9bf63b09963ca6ea1179dfaa9142498556bfac9d (diff)
downloadzig-dcec4d55e36f48e459f4e8f218b8619d9be925db.tar.gz
zig-dcec4d55e36f48e459f4e8f218b8619d9be925db.zip
eliminate stderr usage in std.Build make() functions
* Eliminate all uses of `std.debug.print` in make() functions, instead properly using the step failure reporting mechanism. * Introduce the concept of skipped build steps. These do not cause the build to fail, and they do allow their dependants to run. * RunStep gains a new flag, `skip_foreign_checks` which causes the RunStep to be skipped if stdio mode is `check` and the binary cannot be executed due to it being a foreign executable. - RunStep is improved to automatically use known interpreters to execute binaries if possible (integrating with flags such as -fqemu and -fwasmtime). It only does this after attempting a native execution and receiving a "exec file format" error. - Update RunStep to use an ArrayList for the checks rather than this ad-hoc reallocation/copying mechanism. - `expectStdOutEqual` now also implicitly adds an exit_code==0 check if there is not already an expected termination. This matches previously expected behavior from older API and can be overridden by directly setting the checks array. * Add `dest_sub_path` to `InstallArtifactStep` which allows choosing an arbitrary subdirectory relative to the prefix, as well as overriding the basename. - Delete the custom InstallWithRename step that I found deep in the test/ directory. * WriteFileStep will now update its step display name after the first file is added. * Add missing stdout checks to various standalone test case build scripts.
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/build.zig b/build.zig
index 5f7e214d35..d32f666dac 100644
--- a/build.zig
+++ b/build.zig
@@ -385,7 +385,7 @@ pub fn build(b: *std.Build) !void {
const optimization_modes = chosen_opt_modes_buf[0..chosen_mode_index];
const fmt_include_paths = &.{ "doc", "lib", "src", "test", "tools", "build.zig" };
- const fmt_exclude_paths = &.{ "test/cases" };
+ const fmt_exclude_paths = &.{"test/cases"};
const check_fmt = b.addFmt(.{
.paths = fmt_include_paths,
.exclude_paths = fmt_exclude_paths,
@@ -402,7 +402,6 @@ pub fn build(b: *std.Build) !void {
const do_fmt_step = b.step("fmt", "Modify source files in place to have conforming formatting");
do_fmt_step.dependOn(&do_fmt.step);
-
test_step.dependOn(tests.addPkgTests(
b,
test_filter,