Skip to content

Commit c82d8c8

Browse files
committed
addWin32ResourceFile: Ignore the resource file if the target object format is not coff
1 parent 8ca1cf0 commit c82d8c8

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
@@ -924,6 +924,10 @@ pub fn addCSourceFile(self: *Compile, source: CSourceFile) void {
924924
}
925925

926926
pub fn addWin32ResourceFile(self: *Compile, source: RcSourceFile) void {
927+
// Only the PE/COFF format has a Resource Table, so for any other target
928+
// the resource file is just ignored.
929+
if (self.target.getObjectFormat() != .coff) return;
930+
927931
const b = self.step.owner;
928932
const rc_source_file = b.allocator.create(RcSourceFile) catch @panic("OOM");
929933
rc_source_file.* = source.dupe(b);

0 commit comments

Comments
 (0)