authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-15 19:59:53-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-15 19:59:53-08:00
loge4868693a53f6e26f74e584e054008e6d5c2a350
tree2fc84feb1a891c0bf31a289e625f314b9dda91b8
parent24bdb42a23828d71238370af5d16a2421bf3216f

Compilation: windows doesn't prelink yet


1 files changed, 5 insertions(+), 2 deletions(-)

src/Compilation.zig+5-2
...@@ -1733,6 +1733,10 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil...@@ -1733,6 +1733,10 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
1733 if (win32_resource_count > 0) {1733 if (win32_resource_count > 0) {
1734 dev.check(.win32_resource);1734 dev.check(.win32_resource);
1735 try comp.win32_resource_table.ensureTotalCapacity(gpa, win32_resource_count);1735 try comp.win32_resource_table.ensureTotalCapacity(gpa, win32_resource_count);
1736 // Add this after adding logic to updateWin32Resource to pass the
1737 // result into link.loadInput. loadInput integration is not implemented
1738 // for Windows linking logic yet.
1739 //comp.remaining_prelink_tasks += @intCast(win32_resource_count);
1736 for (options.rc_source_files) |rc_source_file| {1740 for (options.rc_source_files) |rc_source_file| {
1737 const win32_resource = try gpa.create(Win32Resource);1741 const win32_resource = try gpa.create(Win32Resource);
1738 errdefer gpa.destroy(win32_resource);1742 errdefer gpa.destroy(win32_resource);
...@@ -1743,7 +1747,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil...@@ -1743,7 +1747,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
1743 };1747 };
1744 comp.win32_resource_table.putAssumeCapacityNoClobber(win32_resource, {});1748 comp.win32_resource_table.putAssumeCapacityNoClobber(win32_resource, {});
1745 }1749 }
1746 comp.remaining_prelink_tasks += @intCast(comp.win32_resource_table.count());
17471750
1748 if (options.manifest_file) |manifest_path| {1751 if (options.manifest_file) |manifest_path| {
1749 const win32_resource = try gpa.create(Win32Resource);1752 const win32_resource = try gpa.create(Win32Resource);
...@@ -1754,7 +1757,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil...@@ -1754,7 +1757,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
1754 .src = .{ .manifest = manifest_path },1757 .src = .{ .manifest = manifest_path },
1755 };1758 };
1756 comp.win32_resource_table.putAssumeCapacityNoClobber(win32_resource, {});1759 comp.win32_resource_table.putAssumeCapacityNoClobber(win32_resource, {});
1757 comp.remaining_prelink_tasks += 1;
1758 }1760 }
1759 }1761 }
17601762
...@@ -1935,6 +1937,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil...@@ -1935,6 +1937,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
1935 try comp.link_task_queue.shared.append(gpa, .load_explicitly_provided);1937 try comp.link_task_queue.shared.append(gpa, .load_explicitly_provided);
1936 comp.remaining_prelink_tasks += 1;1938 comp.remaining_prelink_tasks += 1;
1937 }1939 }
1940 log.debug("total prelink tasks: {d}", .{comp.remaining_prelink_tasks});
19381941
1939 return comp;1942 return comp;
1940}1943}