diff options
| author | Kurt Kartaltepe <kkartaltepe@gmail.com> | 2021-07-09 20:41:35 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-24 17:14:20 -0700 |
| commit | a950cb42bdf7b3f339071868c6675e7dcc892bae (patch) | |
| tree | ddf75e85213e2b1ea0d8accb78471b6d25d01b60 /src/Compilation.zig | |
| parent | fdcac5ecbd324170f7281f6704ead18b7d904e72 (diff) | |
| download | zig-a950cb42bdf7b3f339071868c6675e7dcc892bae.tar.gz zig-a950cb42bdf7b3f339071868c6675e7dcc892bae.zip | |
Coff linker: Add IMPLIB support
Allow --out-implib and -implib as passed by cmake and meson to be
correctly passed through to the linker to generate import libraries.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 48899f6f6e..61533eebb0 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -767,6 +767,8 @@ pub const InitOptions = struct { test_filter: ?[]const u8 = null, test_name_prefix: ?[]const u8 = null, subsystem: ?std.Target.SubSystem = null, + /// Windows/PE only. Where to output the import library, can contain directories. + out_implib: ?[]const u8 = null, /// WASI-only. Type of WASI execution model ("command" or "reactor"). wasi_exec_model: ?std.builtin.WasiExecModel = null, /// (Zig compiler development) Enable dumping linker's state as JSON. @@ -946,7 +948,8 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { options.output_mode == .Lib or options.lld_argv.len != 0 or options.image_base_override != null or - options.linker_script != null or options.version_script != null) + options.linker_script != null or options.version_script != null or + options.out_implib != null) { break :blk true; } @@ -1461,6 +1464,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { .each_lib_rpath = options.each_lib_rpath orelse options.is_native_os, .disable_lld_caching = options.disable_lld_caching, .subsystem = options.subsystem, + .out_implib = options.out_implib, .is_test = options.is_test, .wasi_exec_model = wasi_exec_model, .use_stage1 = use_stage1, |
