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 /lib/compiler/aro | |
| 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 'lib/compiler/aro')
| -rw-r--r-- | lib/compiler/aro/aro/Compilation.zig | 2 | ||||
| -rw-r--r-- | lib/compiler/aro/aro/target.zig | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/aro/aro/Compilation.zig b/lib/compiler/aro/aro/Compilation.zig index 22ca9c00ed..414cdb45f0 100644 --- a/lib/compiler/aro/aro/Compilation.zig +++ b/lib/compiler/aro/aro/Compilation.zig @@ -308,7 +308,7 @@ fn generateSystemDefines(comp: *Compilation, w: anytype) !void { ), else => {}, } - if (comp.target.abi == .android) { + if (comp.target.isAndroid()) { try w.writeAll("#define __ANDROID__ 1\n"); } diff --git a/lib/compiler/aro/aro/target.zig b/lib/compiler/aro/aro/target.zig index 5b05e5c9b6..b4b5bb896a 100644 --- a/lib/compiler/aro/aro/target.zig +++ b/lib/compiler/aro/aro/target.zig @@ -690,6 +690,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .eabi => "eabi", .eabihf => "eabihf", .android => "android", + .androideabi => "androideabi", .musl => "musl", .musleabi => "musleabi", .musleabihf => "musleabihf", |
