We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-femit-implib
1 parent 0812b57 commit de81c50Copy full SHA for de81c50
src/main.zig
@@ -2237,11 +2237,14 @@ fn buildOutputType(
2237
};
2238
defer emit_docs_resolved.deinit();
2239
2240
- const is_dyn_lib = switch (output_mode) {
2241
- .Obj, .Exe => false,
+ const is_exe_or_dyn_lib = switch (output_mode) {
+ .Obj => false,
2242
.Lib => (link_mode orelse .Static) == .Dynamic,
2243
+ .Exe => true,
2244
- const implib_eligible = is_dyn_lib and
2245
+ // Note that cmake when targeting Windows will try to execute
2246
+ // zig cc to make an executable and output an implib too.
2247
+ const implib_eligible = is_exe_or_dyn_lib and
2248
emit_bin_loc != null and target_info.target.os.tag == .windows;
2249
if (!implib_eligible) {
2250
if (!emit_implib_arg_provided) {
0 commit comments