From 28e367f4464b7c0b4100e04dd2da33d0cc707d19 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Tue, 30 Jun 2026 18:12:21 -0700 Subject: [PATCH] Build: mark Windows resource compilation stuff as deprecated In preparation for https://codeberg.org/ziglang/zig/issues/31951 --- lib/std/Build.zig | 6 ++++++ lib/std/Build/Module.zig | 7 +++++++ lib/std/Build/Step/Compile.zig | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/lib/std/Build.zig b/lib/std/Build.zig index 6d07c0fb49c6a056151a8fdc0a4adc13aa385dc1..7778c4e2e12e94e57494dc33b367df4c68d7dbd5 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -713,6 +713,9 @@ pub const ExecutableOptions = struct { use_llvm: ?bool = null, use_lld: ?bool = null, zig_lib_dir: ?LazyPath = null, + /// Deprecated. This functionality will be moved to an external package: + /// https://codeberg.org/ziglang/rc + /// /// Embed a `.manifest` file in the compilation if the object format supports it. /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference /// Manifest files must have the extension `.manifest`. @@ -766,6 +769,9 @@ pub const LibraryOptions = struct { use_llvm: ?bool = null, use_lld: ?bool = null, zig_lib_dir: ?LazyPath = null, + /// Deprecated. This functionality will be moved to an external package: + /// https://codeberg.org/ziglang/rc + /// /// Embed a `.manifest` file in the compilation if the object format supports it. /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference /// Manifest files must have the extension `.manifest`. diff --git a/lib/std/Build/Module.zig b/lib/std/Build/Module.zig index f8996ccad050ea9b542a6f37b470a9c33ceb335d..ac5dc3fd9330bee03bcbedce9a6c8d15d6df106c 100644 --- a/lib/std/Build/Module.zig +++ b/lib/std/Build/Module.zig @@ -62,6 +62,8 @@ pub const LinkObject = union(enum) { assembly_file: LazyPath, c_source_file: *CSourceFile, c_source_files: *CSourceFiles, + /// Deprecated. This functionality will be moved to an external package: + /// https://codeberg.org/ziglang/rc win32_resource_file: *RcSourceFile, }; @@ -127,6 +129,8 @@ pub const CSourceFile = struct { } }; +/// Deprecated. This functionality will be moved to an external package: +/// https://codeberg.org/ziglang/rc pub const RcSourceFile = struct { file: LazyPath, /// 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 { m.link_objects.append(arena, .{ .c_source_file = c_source_file }) catch @panic("OOM"); } +/// 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. diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index 4fd3cc4b8098fdbc6ebd4571dfd395c5f6b0b195..b3e56997187301389458a5e4ef0300f78aed5efe 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -63,6 +63,9 @@ installed_headers: std.ArrayList(HeaderInstallation), /// created otherwise. installed_headers_include_tree: ?*Step.WriteFile = null, +/// Deprecated. This functionality will be moved to an external package: +/// https://codeberg.org/ziglang/rc +/// /// Behavior of automatic detection of include directories when compiling .rc files. /// any: Use MSVC if available, fall back to MinGW. /// msvc: Use MSVC include paths (must be present on the system). @@ -70,6 +73,9 @@ installed_headers_include_tree: ?*Step.WriteFile = null, /// none: Do not use any autodetected include paths. rc_includes: std.zig.RcIncludes = .any, +/// Deprecated. This functionality will be moved to an external package: +/// https://codeberg.org/ziglang/rc +/// /// (Windows) .manifest file to embed in the compilation /// Set via options; intended to be read-only after that. win32_manifest: ?LazyPath = null, -- 2.54.0