Skip to content

Commit 445adc2

Browse files
committed
avoid using -z defs/undefs
I'm not sure why I originally thought this was a good idea, but it's problematic on FreeBSD where an undefined reference to environ is expected.
1 parent 66bd74f commit 445adc2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sdk/ZigCompile.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,9 @@ protected override string GenerateCommandLineCommands()
252252
builder.AppendSwitchIfNotNull("-Wl,-soname,", TargetFileName);
253253
}
254254

255-
var (un, no) = AllowUndefinedSymbols ? ("un", string.Empty) : (string.Empty, "no-");
255+
var no = AllowUndefinedSymbols ? string.Empty : "no-";
256256

257257
// These flags are needed to cover Linux and Windows/macOS, respectively.
258-
builder.AppendSwitch(isZig ? $"-z {un}defs" : $"-Wl,-z,{un}defs");
259258
builder.AppendSwitch(isZig ? $"-f{no}allow-shlib-undefined" : $"-Wl,--{no}allow-shlib-undefined");
260259
}
261260
else

0 commit comments

Comments
 (0)