diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-01-30 21:39:43 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-01-31 15:09:35 -0700 |
| commit | 73cf7b64291ed8b5dcb4cb52df103be08f15a347 (patch) | |
| tree | bc5d933ec1440850e910b71dfa9166c87fc53d62 /test/link/wasm/function-table | |
| parent | 71ff60f1265da83e619b1b6b2488ecb448fdfd36 (diff) | |
| download | zig-73cf7b64291ed8b5dcb4cb52df103be08f15a347.tar.gz zig-73cf7b64291ed8b5dcb4cb52df103be08f15a347.zip | |
update build.zig API usage
Diffstat (limited to 'test/link/wasm/function-table')
| -rw-r--r-- | test/link/wasm/function-table/build.zig | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/test/link/wasm/function-table/build.zig b/test/link/wasm/function-table/build.zig index f7572bd6b1..804aaf0b09 100644 --- a/test/link/wasm/function-table/build.zig +++ b/test/link/wasm/function-table/build.zig @@ -2,28 +2,37 @@ const std = @import("std"); const Builder = std.build.Builder; pub fn build(b: *Builder) void { - const mode = b.standardReleaseOptions(); + const optimize = b.standardOptimizeOption(.{}); const test_step = b.step("test", "Test"); test_step.dependOn(b.getInstallStep()); - const import_table = b.addSharedLibrary("lib", "lib.zig", .unversioned); - import_table.setBuildMode(mode); - import_table.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding }); + const import_table = b.addSharedLibrary(.{ + .name = "lib", + .root_source_file = .{ .path = "lib.zig" }, + .target = .{ .cpu_arch = .wasm32, .os_tag = .freestanding }, + .optimize = optimize, + }); import_table.use_llvm = false; import_table.use_lld = false; import_table.import_table = true; - const export_table = b.addSharedLibrary("lib", "lib.zig", .unversioned); - export_table.setBuildMode(mode); - export_table.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding }); + const export_table = b.addSharedLibrary(.{ + .name = "lib", + .root_source_file = .{ .path = "lib.zig" }, + .target = .{ .cpu_arch = .wasm32, .os_tag = .freestanding }, + .optimize = optimize, + }); export_table.use_llvm = false; export_table.use_lld = false; export_table.export_table = true; - const regular_table = b.addSharedLibrary("lib", "lib.zig", .unversioned); - regular_table.setBuildMode(mode); - regular_table.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding }); + const regular_table = b.addSharedLibrary(.{ + .name = "lib", + .root_source_file = .{ .path = "lib.zig" }, + .target = .{ .cpu_arch = .wasm32, .os_tag = .freestanding }, + .optimize = optimize, + }); regular_table.use_llvm = false; regular_table.use_lld = false; |
