diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-10-21 15:40:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-10-23 16:27:39 -0700 |
| commit | 5d75d8f6fc026948aa02309bd820fc15206288e0 (patch) | |
| tree | f51698731964244bdf5f88b61104b5eb949b41f1 /src/target.zig | |
| parent | 2d8ea78249c85552225db8f50b45e2e71ba85a41 (diff) | |
| download | zig-5d75d8f6fc026948aa02309bd820fc15206288e0.tar.gz zig-5d75d8f6fc026948aa02309bd820fc15206288e0.zip | |
also find static libc files on the host
and don't look for glibc files on windows
Diffstat (limited to 'src/target.zig')
| -rw-r--r-- | src/target.zig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/target.zig b/src/target.zig index 8e0b90cd82..ec34a23f0d 100644 --- a/src/target.zig +++ b/src/target.zig @@ -291,10 +291,11 @@ pub fn libcFullLinkFlags(target: std.Target) []const []const u8 { // Solaris releases after 10 merged the threading libraries into libc. .solaris, .illumos => &.{ "-lm", "-lsocket", "-lnsl", "-lc" }, .haiku => &.{ "-lm", "-lroot", "-lpthread", "-lc", "-lnetwork" }, - else => if (target.isAndroid() or target.abi.isOpenHarmony()) - &.{ "-lm", "-lc", "-ldl" } - else - &.{ "-lm", "-lpthread", "-lc", "-ldl", "-lrt", "-lutil" }, + .linux => switch (target.abi) { + .android, .androideabi, .ohos, .ohoseabi => &.{ "-lm", "-lc", "-ldl" }, + else => &.{ "-lm", "-lpthread", "-lc", "-ldl", "-lrt", "-lutil" }, + }, + else => &.{}, }; return result; } |
