File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -3387,17 +3387,16 @@ fn buildOutputType(
3387
3387
.Lib = > create_module .resolved_options .link_mode == .dynamic ,
3388
3388
.Exe = > true ,
3389
3389
};
3390
- // Note that cmake when targeting Windows will try to execute
3391
- // zig cc to make an executable and output an implib too.
3392
3390
const implib_eligible = is_exe_or_dyn_lib and
3393
3391
emit_bin_loc != null and target .os .tag == .windows ;
3394
- if (! implib_eligible ) {
3395
- if (! emit_implib_arg_provided ) {
3396
- emit_implib = .no ;
3397
- } else if (emit_implib != .no ) {
3392
+ if (emit_implib_arg_provided ) {
3393
+ if (emit_implib != .no and ! implib_eligible ) {
3398
3394
fatal ("the argument -femit-implib is allowed only when building a Windows DLL" , .{});
3399
3395
}
3396
+ } else if (! implib_eligible or target .abi .isGnu () or create_module .resolved_options .output_mode == .Exe ) {
3397
+ emit_implib = .no ;
3400
3398
}
3399
+
3401
3400
const default_implib_basename = if (target .abi .isGnu ())
3402
3401
try std .fmt .allocPrint (arena , "lib{s}.dll.a" , .{root_name })
3403
3402
else
You can’t perform that action at this time.
0 commit comments