Deprecated. This functionality will be moved to an external package: https://codeberg.org/ziglang/rc
Resource files must have the extension .rc.
Can be called regardless of target. The .rc file will be ignored
if the target object format does not support embedded resources.
pub fn addWin32ResourceFile(m: *Module, source: RcSourceFile) void
pub fn addWin32ResourceFile(m: *Module, source: RcSourceFile) void {
const graph = m.owner.graph;
const arena = graph.arena;
const target = m.requireKnownTarget();
// Only the PE/COFF format has a Resource Table, so for any other target
// the resource file is ignored.
if (target.ofmt != .coff) return;
const rc_source_file = arena.create(RcSourceFile) catch @panic("OOM");
rc_source_file.* = source.dupe(graph);
m.link_objects.append(arena, .{ .win32_resource_file = rc_source_file }) catch @panic("OOM");
}