Skip to content

Commit

Permalink
fix non-windows builds
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Dec 14, 2023
1 parent 65eaf11 commit 782a194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const std = @import("std");
const builtin = @import("builtin");
const Build = std.Build;

/// The latest binary release available at https://github.com/hexops/mach-dxcompiler/releases
Expand Down Expand Up @@ -269,7 +270,7 @@ fn linkFromSource(b: *Build, step: *std.build.CompileStep, options: Options) !vo
// windows must be built with LTO disabled due to:
// https://github.com/ziglang/zig/issues/15958
dxc_exe.want_lto = false;
if (dxc_exe.target.getAbi() == .msvc) {
if (builtin.os.tag == .windows and dxc_exe.target.getAbi() == .msvc) {
const msvc_lib_dir: ?[]const u8 = try @import("msvc.zig").MsvcLibDir.find(b.allocator);

// The MSVC lib dir looks like this:
Expand Down

0 comments on commit 782a194

Please sign in to comment.