diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-11-05 18:44:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-05 18:44:12 -0500 |
| commit | 702b809ea3e9b9dbdc1fd6efe9306442487e7103 (patch) | |
| tree | bd639378ad2931013ff49789aadfc2104093261c /test/link/wasm/function-table/build.zig | |
| parent | bec36aa7c028f2eaec94a2358f3e1326fcb9a30c (diff) | |
| parent | c893f837151d4764fd34911376836a01192b4d75 (diff) | |
| download | zig-702b809ea3e9b9dbdc1fd6efe9306442487e7103.tar.gz zig-702b809ea3e9b9dbdc1fd6efe9306442487e7103.zip | |
Merge pull request #17815 from Luukdegram/wasm-no-entry
wasm-linker: implement `-fno-entry` and correctly pass `--shared` and `--pie` when given
Diffstat (limited to 'test/link/wasm/function-table/build.zig')
| -rw-r--r-- | test/link/wasm/function-table/build.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/link/wasm/function-table/build.zig b/test/link/wasm/function-table/build.zig index 796ba670ad..906a255642 100644 --- a/test/link/wasm/function-table/build.zig +++ b/test/link/wasm/function-table/build.zig @@ -13,32 +13,35 @@ pub fn build(b: *std.Build) void { } fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.OptimizeMode) void { - const import_table = b.addSharedLibrary(.{ + const import_table = b.addExecutable(.{ .name = "import_table", .root_source_file = .{ .path = "lib.zig" }, .target = .{ .cpu_arch = .wasm32, .os_tag = .freestanding }, .optimize = optimize, }); + import_table.entry = .disabled; import_table.use_llvm = false; import_table.use_lld = false; import_table.import_table = true; - const export_table = b.addSharedLibrary(.{ + const export_table = b.addExecutable(.{ .name = "export_table", .root_source_file = .{ .path = "lib.zig" }, .target = .{ .cpu_arch = .wasm32, .os_tag = .freestanding }, .optimize = optimize, }); + export_table.entry = .disabled; export_table.use_llvm = false; export_table.use_lld = false; export_table.export_table = true; - const regular_table = b.addSharedLibrary(.{ + const regular_table = b.addExecutable(.{ .name = "regular_table", .root_source_file = .{ .path = "lib.zig" }, .target = .{ .cpu_arch = .wasm32, .os_tag = .freestanding }, .optimize = optimize, }); + regular_table.entry = .disabled; regular_table.use_llvm = false; regular_table.use_lld = false; |
