Skip to content

Commit a94d830

Browse files
committed
addWin32ResourceFile: Ignore the resource file if the target object format is not coff
1 parent 73f581b commit a94d830

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/std/Build/Step/Compile.zig

+4
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,10 @@ pub fn addCSourceFile(self: *Compile, source: CSourceFile) void {
932932
}
933933

934934
pub fn addWin32ResourceFile(self: *Compile, source: RcSourceFile) void {
935+
// Only the PE/COFF format has a Resource Table, so for any other target
936+
// the resource file is just ignored.
937+
if (self.target.getObjectFormat() != .coff) return;
938+
935939
const b = self.step.owner;
936940
const rc_source_file = b.allocator.create(RcSourceFile) catch @panic("OOM");
937941
rc_source_file.* = source.dupe(b);

0 commit comments

Comments
 (0)