| ... | ... | @@ -354,7 +354,7 @@ fn eqlIgnoreCase(ignore_case: bool, a: []const u8, b: []const u8) bool { |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | pub fn is_libc_lib_name(target: std.Target, name: []const u8) bool { |
| 357 | | const ignore_case = target.os.tag.isDarwin() or target.os.tag == .windows; |
| 357 | const ignore_case = target.os.tag == .macos or target.os.tag == .windows; |
| 358 | 358 | |
| 359 | 359 | if (eqlIgnoreCase(ignore_case, name, "c")) |
| 360 | 360 | return true; |
| ... | ... | @@ -362,7 +362,6 @@ pub fn is_libc_lib_name(target: std.Target, name: []const u8) bool { |
| 362 | 362 | if (target.isMinGW()) { |
| 363 | 363 | if (eqlIgnoreCase(ignore_case, name, "m")) |
| 364 | 364 | return true; |
| 365 | | |
| 366 | 365 | if (eqlIgnoreCase(ignore_case, name, "uuid")) |
| 367 | 366 | return true; |
| 368 | 367 | if (eqlIgnoreCase(ignore_case, name, "mingw32")) |
| ... | ... | @@ -375,7 +374,7 @@ pub fn is_libc_lib_name(target: std.Target, name: []const u8) bool { |
| 375 | 374 | return false; |
| 376 | 375 | } |
| 377 | 376 | |
| 378 | | if (target.abi.isGnu() or target.abi.isMusl() or target.os.tag.isDarwin()) { |
| 377 | if (target.abi.isGnu() or target.abi.isMusl()) { |
| 379 | 378 | if (eqlIgnoreCase(ignore_case, name, "m")) |
| 380 | 379 | return true; |
| 381 | 380 | if (eqlIgnoreCase(ignore_case, name, "rt")) |
| ... | ... | @@ -392,13 +391,38 @@ pub fn is_libc_lib_name(target: std.Target, name: []const u8) bool { |
| 392 | 391 | return true; |
| 393 | 392 | } |
| 394 | 393 | |
| 395 | | if (target.abi.isMusl() or target.os.tag.isDarwin()) { |
| 394 | if (target.abi.isMusl()) { |
| 396 | 395 | if (eqlIgnoreCase(ignore_case, name, "crypt")) |
| 397 | 396 | return true; |
| 398 | 397 | } |
| 399 | 398 | |
| 400 | | if (target.os.tag.isDarwin() and eqlIgnoreCase(ignore_case, name, "System")) |
| 401 | | return true; |
| 399 | if (target.os.tag.isDarwin()) { |
| 400 | if (eqlIgnoreCase(ignore_case, name, "System")) |
| 401 | return true; |
| 402 | if (eqlIgnoreCase(ignore_case, name, "c")) |
| 403 | return true; |
| 404 | if (eqlIgnoreCase(ignore_case, name, "dbm")) |
| 405 | return true; |
| 406 | if (eqlIgnoreCase(ignore_case, name, "dl")) |
| 407 | return true; |
| 408 | if (eqlIgnoreCase(ignore_case, name, "info")) |
| 409 | return true; |
| 410 | if (eqlIgnoreCase(ignore_case, name, "m")) |
| 411 | return true; |
| 412 | if (eqlIgnoreCase(ignore_case, name, "poll")) |
| 413 | return true; |
| 414 | if (eqlIgnoreCase(ignore_case, name, "proc")) |
| 415 | return true; |
| 416 | if (eqlIgnoreCase(ignore_case, name, "pthread")) |
| 417 | return true; |
| 418 | if (eqlIgnoreCase(ignore_case, name, "rpcsvc")) |
| 419 | return true; |
| 420 | } |
| 421 | |
| 422 | if (target.os.isAtLeast(.macos, .{ .major = 10, .minor = 8, .patch = 0 }) orelse false) { |
| 423 | if (eqlIgnoreCase(ignore_case, name, "mx")) |
| 424 | return true; |
| 425 | } |
| 402 | 426 | |
| 403 | 427 | return false; |
| 404 | 428 | } |