update build.zig API usage

This commit is contained in:
Andrew Kelley
2023-01-30 21:39:43 -07:00
parent 71ff60f126
commit 73cf7b6429
80 changed files with 905 additions and 494 deletions

View File

@@ -2,14 +2,15 @@ const std = @import("std");
const Builder = std.build.Builder;
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const test_step = b.step("test", "Test");
test_step.dependOn(b.getInstallStep());
const lib = b.addSharedLibrary("lib", "lib.zig", .unversioned);
lib.setBuildMode(mode);
lib.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding });
const lib = b.addSharedLibrary(.{
.name = "lib",
.root_source_file = .{ .path = "lib.zig" },
.target = .{ .cpu_arch = .wasm32, .os_tag = .freestanding },
.optimize = b.standardOptimizeOption(.{}),
});
lib.use_llvm = false;
lib.use_lld = false;
lib.strip = false;