| ... | @@ -417,7 +417,8 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { | ... | @@ -417,7 +417,8 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { |
| 417 | return error.MachineCodeModelNotSupported; | 417 | return error.MachineCodeModelNotSupported; |
| 418 | } | 418 | } |
| 419 | | 419 | |
| 420 | const link_libc = options.link_libc or target_util.osRequiresLibC(options.target); | 420 | const link_libc = options.link_libc or |
| | 421 | (is_exe_or_dyn_lib and target_util.osRequiresLibC(options.target)); |
| 421 | | 422 | |
| 422 | const must_dynamic_link = dl: { | 423 | const must_dynamic_link = dl: { |
| 423 | if (target_util.cannotDynamicLink(options.target)) | 424 | if (target_util.cannotDynamicLink(options.target)) |