Skip to content

Commit

Permalink
Workaround SOFT_VDB incremental mode malfunction if shared build by zig
Browse files Browse the repository at this point in the history
Issue #601 (bdwgc).

* build.zig [build_shared_libs && t.os.tag==.linux] (flags): Add
-D NO_VDB_FOR_STATIC_ROOTS; add FIXME item.
  • Loading branch information
ivmai committed Jan 11, 2024
1 parent f269109 commit 2ba7381
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ pub fn build(b: *std.Build) void {
flags.appendSlice(&.{
"-fvisibility=hidden",
}) catch unreachable;

// FIXME: gctest bss is not tracked by SOFT_VDB otherise.
if (t.os.tag == .linux) {
flags.append("-D NO_VDB_FOR_STATIC_ROOTS") catch unreachable;
}
} else {
flags.append("-D GC_NOT_DLL") catch unreachable;
if (t.os.tag == .windows) {
Expand Down

0 comments on commit 2ba7381

Please sign in to comment.