Skip to content

Commit 19d1ec1

Browse files
committed
work around more CI failures
1 parent 4acc809 commit 19d1ec1

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

lib/ubsan_rt.zig

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ const Value = extern struct {
126126
) !void {
127127
comptime assert(fmt.len == 0);
128128

129+
if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) {
130+
try writer.writeAll("(unknown)");
131+
return;
132+
}
133+
129134
switch (value.td.kind) {
130135
.integer => {
131136
if (value.td.isSigned()) {
@@ -626,22 +631,24 @@ fn exportHandler(
626631
handler: anytype,
627632
comptime sym_name: []const u8,
628633
) void {
634+
const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
629635
const N = "__ubsan_handle_" ++ sym_name;
630-
@export(handler, .{ .name = N, .linkage = .weak });
636+
@export(handler, .{ .name = N, .linkage = linkage });
631637
}
632638

633639
fn exportHandlerWithAbort(
634640
handler: anytype,
635641
abort_handler: anytype,
636642
comptime sym_name: []const u8,
637643
) void {
644+
const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
638645
{
639646
const N = "__ubsan_handle_" ++ sym_name;
640-
@export(handler, .{ .name = N, .linkage = .weak });
647+
@export(handler, .{ .name = N, .linkage = linkage });
641648
}
642649
{
643650
const N = "__ubsan_handle_" ++ sym_name ++ "_abort";
644-
@export(abort_handler, .{ .name = N, .linkage = .weak });
651+
@export(abort_handler, .{ .name = N, .linkage = linkage });
645652
}
646653
}
647654

test/link/wasm/export/build.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
1919
no_export.entry = .disabled;
2020
no_export.use_llvm = false;
2121
no_export.use_lld = false;
22+
no_export.bundle_ubsan_rt = false;
2223

2324
const dynamic_export = b.addExecutable(.{
2425
.name = "dynamic",

test/link/wasm/function-table/build.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
2121
export_table.use_lld = false;
2222
export_table.export_table = true;
2323
export_table.link_gc_sections = false;
24+
export_table.bundle_ubsan_rt = false;
2425

2526
const regular_table = b.addExecutable(.{
2627
.name = "regular_table",
@@ -34,6 +35,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
3435
regular_table.use_llvm = false;
3536
regular_table.use_lld = false;
3637
regular_table.link_gc_sections = false; // Ensure function table is not empty
38+
regular_table.bundle_ubsan_rt = false;
3739

3840
const check_export = export_table.checkObject();
3941
const check_regular = regular_table.checkObject();

test/link/wasm/shared-memory/build.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt
3131
exe.shared_memory = true;
3232
exe.max_memory = 67108864;
3333
exe.root_module.export_symbol_names = &.{"foo"};
34+
exe.bundle_ubsan_rt = false;
3435

3536
const check_exe = exe.checkObject();
3637

test/link/wasm/type/build.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
2121
exe.use_llvm = false;
2222
exe.use_lld = false;
2323
exe.root_module.export_symbol_names = &.{"foo"};
24+
exe.bundle_ubsan_rt = false;
2425
b.installArtifact(exe);
2526

2627
const check_exe = exe.checkObject();

0 commit comments

Comments
 (0)