| author | |
| committer | |
| log | 44d3b5a6e47c0caa3b5b3fe998ad52ef1d83e032 |
| tree | d9d6ee9fd7086701442ab7270e386c706e923ac3 |
| parent | 35b9db3b1549668c5a3a464f97aed1441b18d791 |
6 files changed, 14 insertions(+), 1 deletions(-)
test/link/glibc_compat/build.zig+6| ... | @@ -22,6 +22,8 @@ pub fn build(b: *std.Build) void { | ... | @@ -22,6 +22,8 @@ pub fn build(b: *std.Build) void { |
| 22 | .link_libc = true, | 22 | .link_libc = true, |
| 23 | }), | 23 | }), |
| 24 | }); | 24 | }); |
| 25 | // We disable UBSAN for these tests as the libc being tested here is | ||
| 26 | // so old, it doesn't even support compiling our UBSAN implementation. | ||
| 25 | exe.bundle_ubsan_rt = false; | 27 | exe.bundle_ubsan_rt = false; |
| 26 | exe.root_module.sanitize_c = false; | 28 | exe.root_module.sanitize_c = false; |
| 27 | exe.root_module.addCSourceFile(.{ .file = b.path("main.c") }); | 29 | exe.root_module.addCSourceFile(.{ .file = b.path("main.c") }); |
| ... | @@ -64,6 +66,8 @@ pub fn build(b: *std.Build) void { | ... | @@ -64,6 +66,8 @@ pub fn build(b: *std.Build) void { |
| 64 | .link_libc = true, | 66 | .link_libc = true, |
| 65 | }), | 67 | }), |
| 66 | }); | 68 | }); |
| 69 | // We disable UBSAN for these tests as the libc being tested here is | ||
| 70 | // so old, it doesn't even support compiling our UBSAN implementation. | ||
| 67 | exe.bundle_ubsan_rt = false; | 71 | exe.bundle_ubsan_rt = false; |
| 68 | exe.root_module.sanitize_c = false; | 72 | exe.root_module.sanitize_c = false; |
| 69 | exe.root_module.addCSourceFile(.{ .file = b.path("glibc_runtime_check.c") }); | 73 | exe.root_module.addCSourceFile(.{ .file = b.path("glibc_runtime_check.c") }); |
| ... | @@ -165,6 +169,8 @@ pub fn build(b: *std.Build) void { | ... | @@ -165,6 +169,8 @@ pub fn build(b: *std.Build) void { |
| 165 | .link_libc = true, | 169 | .link_libc = true, |
| 166 | }), | 170 | }), |
| 167 | }); | 171 | }); |
| 172 | // We disable UBSAN for these tests as the libc being tested here is | ||
| 173 | // so old, it doesn't even support compiling our UBSAN implementation. | ||
| 168 | exe.bundle_ubsan_rt = false; | 174 | exe.bundle_ubsan_rt = false; |
| 169 | exe.root_module.sanitize_c = false; | 175 | exe.root_module.sanitize_c = false; |
| 170 | 176 |
test/link/wasm/export-data/build.zig+1| ... | @@ -13,6 +13,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -13,6 +13,7 @@ pub fn build(b: *std.Build) void { |
| 13 | }), | 13 | }), |
| 14 | }); | 14 | }); |
| 15 | lib.entry = .disabled; | 15 | lib.entry = .disabled; |
| 16 | // Disabling due to self-hosted wasm linker bug. | ||
| 16 | lib.bundle_ubsan_rt = false; | 17 | lib.bundle_ubsan_rt = false; |
| 17 | lib.use_lld = false; | 18 | lib.use_lld = false; |
| 18 | lib.root_module.export_symbol_names = &.{ "foo", "bar" }; | 19 | lib.root_module.export_symbol_names = &.{ "foo", "bar" }; |
test/link/wasm/export/build.zig+3-1| ... | @@ -19,6 +19,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -19,6 +19,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 19 | no_export.entry = .disabled; | 19 | no_export.entry = .disabled; |
| 20 | no_export.use_llvm = false; | 20 | no_export.use_llvm = false; |
| 21 | no_export.use_lld = false; | 21 | no_export.use_lld = false; |
| 22 | // Don't pull in ubsan, since we're just expecting a very minimal executable. | ||
| 22 | no_export.bundle_ubsan_rt = false; | 23 | no_export.bundle_ubsan_rt = false; |
| 23 | 24 | ||
| 24 | const dynamic_export = b.addExecutable(.{ | 25 | const dynamic_export = b.addExecutable(.{ |
| ... | @@ -33,7 +34,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -33,7 +34,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 33 | dynamic_export.rdynamic = true; | 34 | dynamic_export.rdynamic = true; |
| 34 | dynamic_export.use_llvm = false; | 35 | dynamic_export.use_llvm = false; |
| 35 | dynamic_export.use_lld = false; | 36 | dynamic_export.use_lld = false; |
| 36 | // don't pull in ubsan, since we're just expecting a minimal executable | 37 | // Don't pull in ubsan, since we're just expecting a very minimal executable. |
| 37 | dynamic_export.bundle_ubsan_rt = false; | 38 | dynamic_export.bundle_ubsan_rt = false; |
| 38 | 39 | ||
| 39 | const force_export = b.addExecutable(.{ | 40 | const force_export = b.addExecutable(.{ |
| ... | @@ -48,6 +49,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -48,6 +49,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 48 | force_export.root_module.export_symbol_names = &.{"foo"}; | 49 | force_export.root_module.export_symbol_names = &.{"foo"}; |
| 49 | force_export.use_llvm = false; | 50 | force_export.use_llvm = false; |
| 50 | force_export.use_lld = false; | 51 | force_export.use_lld = false; |
| 52 | // Don't pull in ubsan, since we're just expecting a very minimal executable. | ||
| 51 | force_export.bundle_ubsan_rt = false; | 53 | force_export.bundle_ubsan_rt = false; |
| 52 | 54 | ||
| 53 | const check_no_export = no_export.checkObject(); | 55 | const check_no_export = no_export.checkObject(); |
test/link/wasm/function-table/build.zig+2| ... | @@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 21 | export_table.use_lld = false; | 21 | export_table.use_lld = false; |
| 22 | export_table.export_table = true; | 22 | export_table.export_table = true; |
| 23 | export_table.link_gc_sections = false; | 23 | export_table.link_gc_sections = false; |
| 24 | // Don't pull in ubsan, since we're just expecting a very minimal executable. | ||
| 24 | export_table.bundle_ubsan_rt = false; | 25 | export_table.bundle_ubsan_rt = false; |
| 25 | 26 | ||
| 26 | const regular_table = b.addExecutable(.{ | 27 | const regular_table = b.addExecutable(.{ |
| ... | @@ -35,6 +36,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -35,6 +36,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 35 | regular_table.use_llvm = false; | 36 | regular_table.use_llvm = false; |
| 36 | regular_table.use_lld = false; | 37 | regular_table.use_lld = false; |
| 37 | regular_table.link_gc_sections = false; // Ensure function table is not empty | 38 | regular_table.link_gc_sections = false; // Ensure function table is not empty |
| 39 | // Don't pull in ubsan, since we're just expecting a very minimal executable. | ||
| 38 | regular_table.bundle_ubsan_rt = false; | 40 | regular_table.bundle_ubsan_rt = false; |
| 39 | 41 | ||
| 40 | const check_export = export_table.checkObject(); | 42 | const check_export = export_table.checkObject(); |
test/link/wasm/shared-memory/build.zig+1| ... | @@ -31,6 +31,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt | ... | @@ -31,6 +31,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt |
| 31 | exe.shared_memory = true; | 31 | exe.shared_memory = true; |
| 32 | exe.max_memory = 67108864; | 32 | exe.max_memory = 67108864; |
| 33 | exe.root_module.export_symbol_names = &.{"foo"}; | 33 | exe.root_module.export_symbol_names = &.{"foo"}; |
| 34 | // Don't pull in ubsan, since we're just expecting a very minimal executable. | ||
| 34 | exe.bundle_ubsan_rt = false; | 35 | exe.bundle_ubsan_rt = false; |
| 35 | 36 | ||
| 36 | const check_exe = exe.checkObject(); | 37 | const check_exe = exe.checkObject(); |
test/link/wasm/type/build.zig+1| ... | @@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 21 | exe.use_llvm = false; | 21 | exe.use_llvm = false; |
| 22 | exe.use_lld = false; | 22 | exe.use_lld = false; |
| 23 | exe.root_module.export_symbol_names = &.{"foo"}; | 23 | exe.root_module.export_symbol_names = &.{"foo"}; |
| 24 | // Don't pull in ubsan, since we're just expecting a very minimal executable. | ||
| 24 | exe.bundle_ubsan_rt = false; | 25 | exe.bundle_ubsan_rt = false; |
| 25 | b.installArtifact(exe); | 26 | b.installArtifact(exe); |
| 26 | 27 |