authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2026-06-30 18:12:21-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-07-01 10:24:02+02:00
log28e367f4464b7c0b4100e04dd2da33d0cc707d19
tree54fb13bb1fb0b5dfce9f4dc64ca12515bbb5d8c4
parent426de8e4b21676599fbdbb0cae6f724718a8a076

Build: mark Windows resource compilation stuff as deprecated

In preparation for https://codeberg.org/ziglang/zig/issues/31951

3 files changed, 19 insertions(+), 0 deletions(-)

lib/std/Build.zig+6
...@@ -713,6 +713,9 @@ pub const ExecutableOptions = struct {...@@ -713,6 +713,9 @@ pub const ExecutableOptions = struct {
713 use_llvm: ?bool = null,713 use_llvm: ?bool = null,
714 use_lld: ?bool = null,714 use_lld: ?bool = null,
715 zig_lib_dir: ?LazyPath = null,715 zig_lib_dir: ?LazyPath = null,
716 /// Deprecated. This functionality will be moved to an external package:
717 /// https://codeberg.org/ziglang/rc
718 ///
716 /// Embed a `.manifest` file in the compilation if the object format supports it.719 /// Embed a `.manifest` file in the compilation if the object format supports it.
717 /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference720 /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference
718 /// Manifest files must have the extension `.manifest`.721 /// Manifest files must have the extension `.manifest`.
...@@ -766,6 +769,9 @@ pub const LibraryOptions = struct {...@@ -766,6 +769,9 @@ pub const LibraryOptions = struct {
766 use_llvm: ?bool = null,769 use_llvm: ?bool = null,
767 use_lld: ?bool = null,770 use_lld: ?bool = null,
768 zig_lib_dir: ?LazyPath = null,771 zig_lib_dir: ?LazyPath = null,
772 /// Deprecated. This functionality will be moved to an external package:
773 /// https://codeberg.org/ziglang/rc
774 ///
769 /// Embed a `.manifest` file in the compilation if the object format supports it.775 /// Embed a `.manifest` file in the compilation if the object format supports it.
770 /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference776 /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference
771 /// Manifest files must have the extension `.manifest`.777 /// Manifest files must have the extension `.manifest`.
lib/std/Build/Module.zig+7
...@@ -62,6 +62,8 @@ pub const LinkObject = union(enum) {...@@ -62,6 +62,8 @@ pub const LinkObject = union(enum) {
62 assembly_file: LazyPath,62 assembly_file: LazyPath,
63 c_source_file: *CSourceFile,63 c_source_file: *CSourceFile,
64 c_source_files: *CSourceFiles,64 c_source_files: *CSourceFiles,
65 /// Deprecated. This functionality will be moved to an external package:
66 /// https://codeberg.org/ziglang/rc
65 win32_resource_file: *RcSourceFile,67 win32_resource_file: *RcSourceFile,
66};68};
6769
...@@ -127,6 +129,8 @@ pub const CSourceFile = struct {...@@ -127,6 +129,8 @@ pub const CSourceFile = struct {
127 }129 }
128};130};
129131
132/// Deprecated. This functionality will be moved to an external package:
133/// https://codeberg.org/ziglang/rc
130pub const RcSourceFile = struct {134pub const RcSourceFile = struct {
131 file: LazyPath,135 file: LazyPath,
132 /// Any option that rc.exe accepts will work here, with the exception of:136 /// Any option that rc.exe accepts will work here, with the exception of:
...@@ -413,6 +417,9 @@ pub fn addCSourceFile(m: *Module, source: CSourceFile) void {...@@ -413,6 +417,9 @@ pub fn addCSourceFile(m: *Module, source: CSourceFile) void {
413 m.link_objects.append(arena, .{ .c_source_file = c_source_file }) catch @panic("OOM");417 m.link_objects.append(arena, .{ .c_source_file = c_source_file }) catch @panic("OOM");
414}418}
415419
420/// Deprecated. This functionality will be moved to an external package:
421/// https://codeberg.org/ziglang/rc
422///
416/// Resource files must have the extension `.rc`.423/// Resource files must have the extension `.rc`.
417/// Can be called regardless of target. The .rc file will be ignored424/// Can be called regardless of target. The .rc file will be ignored
418/// if the target object format does not support embedded resources.425/// if the target object format does not support embedded resources.
lib/std/Build/Step/Compile.zig+6
...@@ -63,6 +63,9 @@ installed_headers: std.ArrayList(HeaderInstallation),...@@ -63,6 +63,9 @@ installed_headers: std.ArrayList(HeaderInstallation),
63/// created otherwise.63/// created otherwise.
64installed_headers_include_tree: ?*Step.WriteFile = null,64installed_headers_include_tree: ?*Step.WriteFile = null,
6565
66/// Deprecated. This functionality will be moved to an external package:
67/// https://codeberg.org/ziglang/rc
68///
66/// Behavior of automatic detection of include directories when compiling .rc files.69/// Behavior of automatic detection of include directories when compiling .rc files.
67/// any: Use MSVC if available, fall back to MinGW.70/// any: Use MSVC if available, fall back to MinGW.
68/// msvc: Use MSVC include paths (must be present on the system).71/// msvc: Use MSVC include paths (must be present on the system).
...@@ -70,6 +73,9 @@ installed_headers_include_tree: ?*Step.WriteFile = null,...@@ -70,6 +73,9 @@ installed_headers_include_tree: ?*Step.WriteFile = null,
70/// none: Do not use any autodetected include paths.73/// none: Do not use any autodetected include paths.
71rc_includes: std.zig.RcIncludes = .any,74rc_includes: std.zig.RcIncludes = .any,
7275
76/// Deprecated. This functionality will be moved to an external package:
77/// https://codeberg.org/ziglang/rc
78///
73/// (Windows) .manifest file to embed in the compilation79/// (Windows) .manifest file to embed in the compilation
74/// Set via options; intended to be read-only after that.80/// Set via options; intended to be read-only after that.
75win32_manifest: ?LazyPath = null,81win32_manifest: ?LazyPath = null,