| ... | ... | @@ -352,7 +352,7 @@ pub fn resolve(options: Options) ResolveError!Config { |
| 352 | 352 | break :b .static; |
| 353 | 353 | } |
| 354 | 354 | if (explicitly_exe_or_dyn_lib and link_libc and |
| 355 | | (target.isGnuLibC() or target_util.osRequiresLibC(target))) |
| 355 | (target_util.osRequiresLibC(target) or (target.isGnuLibC() and !options.resolved_target.is_native_abi))) |
| 356 | 356 | { |
| 357 | 357 | if (options.link_mode == .static) return error.LibCRequiresDynamicLinking; |
| 358 | 358 | break :b .dynamic; |
| ... | ... | @@ -367,11 +367,11 @@ pub fn resolve(options: Options) ResolveError!Config { |
| 367 | 367 | |
| 368 | 368 | if (options.link_mode) |link_mode| break :b link_mode; |
| 369 | 369 | |
| 370 | | if (explicitly_exe_or_dyn_lib and link_libc and |
| 371 | | options.resolved_target.is_native_abi and target.abi.isMusl()) |
| 370 | if (explicitly_exe_or_dyn_lib and link_libc and options.resolved_target.is_native_abi and |
| 371 | (target.isGnuLibC() or target.isMuslLibC())) |
| 372 | 372 | { |
| 373 | 373 | // If targeting the system's native ABI and the system's libc is |
| 374 | | // musl, link dynamically by default. |
| 374 | // glibc or musl, link dynamically by default. |
| 375 | 375 | break :b .dynamic; |
| 376 | 376 | } |
| 377 | 377 | |