Allow build.zig scripts to define module definition files (.def) when building win32 dlls.

This commit is contained in:
antme0
2026-02-08 18:48:54 +01:00
committed by Andrew Kelley
parent f061c0dc28
commit fb18f2096a
3 changed files with 24 additions and 1 deletions
+3
View File
@@ -832,6 +832,8 @@ pub const LibraryOptions = struct {
/// Can be set regardless of target. The `.manifest` file will be ignored
/// if the target object format does not support embedded manifests.
win32_manifest: ?LazyPath = null,
/// Win32 module definition file (.def).
win32_module_definition: ?LazyPath = null,
};
pub fn addLibrary(b: *Build, options: LibraryOptions) *Step.Compile {
@@ -846,6 +848,7 @@ pub fn addLibrary(b: *Build, options: LibraryOptions) *Step.Compile {
.use_lld = options.use_lld,
.zig_lib_dir = options.zig_lib_dir,
.win32_manifest = options.win32_manifest,
.win32_module_definition = options.win32_module_definition,
});
}