Skip to content

Commit

Permalink
Detect the target os tag when setting is_macos and is_windows
Browse files Browse the repository at this point in the history
resolves #3
  • Loading branch information
Ultra-Code committed Dec 5, 2024
1 parent 825c6a5 commit e43022f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pub fn build(b: *Build) void {

// writing WritingLibFiles isn't implemented on windows
// and zld the only linker suppored on macos
const is_macos = builtin.os.tag == .macos;
const is_windows = builtin.os.tag == .windows;
const is_macos = builtin.os.tag == .macos or target.result.os.tag == .macos;
const is_windows = builtin.os.tag == .windows or target.result.os.tag == .windows;
const use_lld = if (is_macos) false else if (is_windows) true else switch (optimize) {
.Debug => false,
else => true,
Expand Down

0 comments on commit e43022f

Please sign in to comment.