| ... | ... | @@ -335,6 +335,13 @@ pub fn resolve(options: Options) ResolveError!Config { |
| 335 | 335 | break :b true; |
| 336 | 336 | } |
| 337 | 337 | if (options.link_libc) |x| break :b x; |
| 338 | switch (target.os.tag) { |
| 339 | // These targets don't require libc, but we don't yet have a syscall layer for them, |
| 340 | // so we default to linking libc for now. |
| 341 | .freebsd, |
| 342 | => break :b true, |
| 343 | else => {}, |
| 344 | } |
| 338 | 345 | if (options.ensure_libc_on_non_freestanding and target.os.tag != .freestanding) |
| 339 | 346 | break :b true; |
| 340 | 347 | |