mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
addWin32ResourceFile: Ignore the resource file if the target object format is not coff
This commit is contained in:
parent
73f581b7bc
commit
a94d830a48
@ -932,6 +932,10 @@ pub fn addCSourceFile(self: *Compile, source: CSourceFile) void {
|
||||
}
|
||||
|
||||
pub fn addWin32ResourceFile(self: *Compile, source: RcSourceFile) void {
|
||||
// Only the PE/COFF format has a Resource Table, so for any other target
|
||||
// the resource file is just ignored.
|
||||
if (self.target.getObjectFormat() != .coff) return;
|
||||
|
||||
const b = self.step.owner;
|
||||
const rc_source_file = b.allocator.create(RcSourceFile) catch @panic("OOM");
|
||||
rc_source_file.* = source.dupe(b);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user