mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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.
26 lines
662 B
Zig
26 lines
662 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const lib = b.addLibrary(.{
|
|
.linkage = .dynamic,
|
|
.name = "mathtest",
|
|
.root_source_file = b.path("mathtest.zig"),
|
|
.version = .{ .major = 1, .minor = 0, .patch = 0 },
|
|
});
|
|
const exe = b.addExecutable(.{
|
|
.name = "test",
|
|
});
|
|
exe.addCSourceFile(.{ .file = b.path("test.c"), .flags = &.{"-std=c99"} });
|
|
exe.linkLibrary(lib);
|
|
exe.linkSystemLibrary("c");
|
|
|
|
b.default_step.dependOn(&exe.step);
|
|
|
|
const run_cmd = exe.run();
|
|
|
|
const test_step = b.step("test", "Test the program");
|
|
test_step.dependOn(&run_cmd.step);
|
|
}
|
|
|
|
// syntax
|