zig/test/standalone/config_header/build.zig
Linus Groh eb37552536 Remove numerous things deprecated during the 0.14 release cycle
Basically everything that has a direct replacement or no uses left.

Notable omissions:

- std.ArrayHashMap: Too much fallout, needs a separate cleanup.
- std.debug.runtime_safety: Too much fallout.
- std.heap.GeneralPurposeAllocator: Lots of references to it remain, not
  a simple find and replace as "debug allocator" is not equivalent to
  "general purpose allocator".
- std.io.Reader: Is being reworked at the moment.
- std.unicode.utf8Decode(): No replacement, needs a new API first.
- Manifest backwards compat options: Removal would break test data used
  by TestFetchBuilder.
- panic handler needs to be a namespace: Many tests still rely on it
  being a function, needs a separate cleanup.
2025-07-11 08:17:43 +02:00

28 lines
876 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const config_header = b.addConfigHeader(
.{ .style = .{ .autoconf_undef = b.path("config.h.in") } },
.{
.SOME_NO = null,
.SOME_TRUE = true,
.SOME_FALSE = false,
.SOME_ZERO = 0,
.SOME_ONE = 1,
.SOME_TEN = 10,
.SOME_ENUM = @as(enum { foo, bar }, .foo),
.SOME_ENUM_LITERAL = .@"test",
.SOME_STRING = "test",
.PREFIX_SPACE = null,
.PREFIX_TAB = null,
.POSTFIX_SPACE = null,
.POSTFIX_TAB = null,
},
);
const check_config_header = b.addCheckFile(config_header.getOutput(), .{ .expected_exact = @embedFile("config.h") });
const test_step = b.step("test", "Test it");
test_step.dependOn(&check_config_header.step);
}