Skip to content

Commit 66bd74f

Browse files
committed
always build binaries with the -dynamic flag
closes #83
1 parent ed450a7 commit 66bd74f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sdk/ZigCompile.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,11 @@ protected override string GenerateCommandLineCommands()
272272
builder.AppendSwitch("-rdynamic");
273273
}
274274

275+
// The compiler uses static linking by default when it can. We want dynamic linking in all cases.
276+
builder.AppendSwitch("-dynamic");
277+
275278
if (isZig)
276279
{
277-
// The compiler uses static linking by default when building Zig code. We want dynamic linking in all cases.
278-
builder.AppendSwitch("-dynamic");
279280
builder.AppendSwitch("-lc");
280281

281282
if (_configuration == ZigConfiguration.Release)

0 commit comments

Comments
 (0)