Skip to content

Commit 483c2ae

Browse files
committed
fix(cross-compile): Detect the target os tag when setting is_macos and is_windows
resolves #3
1 parent 825c6a5 commit 483c2ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pub fn build(b: *Build) void {
2222

2323
// writing WritingLibFiles isn't implemented on windows
2424
// and zld the only linker suppored on macos
25-
const is_macos = builtin.os.tag == .macos;
26-
const is_windows = builtin.os.tag == .windows;
25+
const is_macos = builtin.os.tag == .macos or target.result.os.tag == .macos;
26+
const is_windows = builtin.os.tag == .windows or target.result.os.tag == .windows;
2727
const use_lld = if (is_macos) false else if (is_windows) true else switch (optimize) {
2828
.Debug => false,
2929
else => true,

0 commit comments

Comments
 (0)