diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-09-24 09:23:24 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-09-24 09:23:24 +0200 |
| commit | ebbc50d8be3582cb67baa952ce7a52296a04a3c1 (patch) | |
| tree | fd3a12c330d762a9ac72eedb7fad276d33e2bc75 /src/target.zig | |
| parent | d3ba5f397d3270047bcf05c7ed21c5bd6b97e75b (diff) | |
| download | zig-ebbc50d8be3582cb67baa952ce7a52296a04a3c1.tar.gz zig-ebbc50d8be3582cb67baa952ce7a52296a04a3c1.zip | |
std.Target: Introduce Abi.androideabi to distinguish the soft float case.
Abi.android on its own is not enough to know whether soft float or hard float
should be used. In the C world, androideabi is typically used for the soft float
case, so let's go with that.
Note that Android doesn't have a hard float ABI, so no androideabihf.
Closes #21488.
Diffstat (limited to 'src/target.zig')
| -rw-r--r-- | src/target.zig | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/target.zig b/src/target.zig index d85981ec84..3b90c4f413 100644 --- a/src/target.zig +++ b/src/target.zig @@ -304,20 +304,17 @@ pub fn libcFullLinkFlags(target: std.Target) []const []const u8 { "-lc", "-lnetwork", }, - else => switch (target.abi) { - .android => &[_][]const u8{ - "-lm", - "-lc", - "-ldl", - }, - else => &[_][]const u8{ - "-lm", - "-lpthread", - "-lc", - "-ldl", - "-lrt", - "-lutil", - }, + else => if (target.isAndroid()) &[_][]const u8{ + "-lm", + "-lc", + "-ldl", + } else &[_][]const u8{ + "-lm", + "-lpthread", + "-lc", + "-ldl", + "-lrt", + "-lutil", }, }; } |
