| author | |
| committer | |
| log | b86841244421da7001a070e9515e57223f695674 |
| tree | 2827f9a0425b851d2f95315aa1c28c6b0065d0e6 |
| parent | d591145f5dcab5aba1ab6aa65e7a57663f3a0f19 |
closes https://codeberg.org/ziglang/zig/issues/309505 files changed, 9 insertions(+), 0 deletions(-)
lib/std/Target.zig+1| ... | @@ -799,6 +799,7 @@ pub const Abi = enum { | ... | @@ -799,6 +799,7 @@ pub const Abi = enum { |
| 799 | simulator, | 799 | simulator, |
| 800 | ohos, | 800 | ohos, |
| 801 | ohoseabi, | 801 | ohoseabi, |
| 802 | call0, | ||
| 802 | 803 | ||
| 803 | // LLVM tags deliberately omitted: | 804 | // LLVM tags deliberately omitted: |
| 804 | // - amplification | 805 | // - amplification |
lib/std/zig/LibCDirs.zig+1| ... | @@ -288,6 +288,7 @@ fn libCGenericName(target: *const std.Target) [:0]const u8 { | ... | @@ -288,6 +288,7 @@ fn libCGenericName(target: *const std.Target) [:0]const u8 { |
| 288 | .msvc, | 288 | .msvc, |
| 289 | .itanium, | 289 | .itanium, |
| 290 | .simulator, | 290 | .simulator, |
| 291 | .call0, | ||
| 291 | => unreachable, | 292 | => unreachable, |
| 292 | } | 293 | } |
| 293 | } | 294 | } |
lib/std/zig/system.zig+4| ... | @@ -460,6 +460,10 @@ pub fn resolveTargetQuery(io: Io, query: Target.Query) DetectError!Target { | ... | @@ -460,6 +460,10 @@ pub fn resolveTargetQuery(io: Io, query: Target.Query) DetectError!Target { |
| 460 | if (result.cpu.arch.isArm() and result.abi.float() == .soft) { | 460 | if (result.cpu.arch.isArm() and result.abi.float() == .soft) { |
| 461 | result.cpu.features.removeFeature(@intFromEnum(Target.arm.Feature.vfp2)); | 461 | result.cpu.features.removeFeature(@intFromEnum(Target.arm.Feature.vfp2)); |
| 462 | } | 462 | } |
| 463 | |||
| 464 | if (result.cpu.arch.isXtensa() and result.abi == .call0) { | ||
| 465 | result.cpu.features.removeFeature(@intFromEnum(Target.xtensa.Feature.windowed)); | ||
| 466 | } | ||
| 463 | } | 467 | } |
| 464 | 468 | ||
| 465 | // It's possible that we detect the native ABI, but fail to detect the OS version or were told | 469 | // It's possible that we detect the native ABI, but fail to detect the OS version or were told |
src/codegen/llvm.zig+1| ... | @@ -306,6 +306,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8 | ... | @@ -306,6 +306,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8 |
| 306 | .itanium => "itanium", | 306 | .itanium => "itanium", |
| 307 | .simulator => "simulator", | 307 | .simulator => "simulator", |
| 308 | .ohos, .ohoseabi => "ohos", | 308 | .ohos, .ohoseabi => "ohos", |
| 309 | .call0 => "unknown", | ||
| 309 | }; | 310 | }; |
| 310 | try llvm_triple.appendSlice(llvm_abi); | 311 | try llvm_triple.appendSlice(llvm_abi); |
| 311 | 312 |
test/llvm_targets.zig+2| ... | @@ -344,7 +344,9 @@ const targets = [_]std.Target.Query{ | ... | @@ -344,7 +344,9 @@ const targets = [_]std.Target.Query{ |
| 344 | 344 | ||
| 345 | .{ .cpu_arch = .xcore, .os_tag = .freestanding, .abi = .none }, | 345 | .{ .cpu_arch = .xcore, .os_tag = .freestanding, .abi = .none }, |
| 346 | 346 | ||
| 347 | .{ .cpu_arch = .xtensa, .os_tag = .freestanding, .abi = .call0 }, | ||
| 347 | .{ .cpu_arch = .xtensa, .os_tag = .freestanding, .abi = .none }, | 348 | .{ .cpu_arch = .xtensa, .os_tag = .freestanding, .abi = .none }, |
| 349 | .{ .cpu_arch = .xtensa, .os_tag = .linux, .abi = .call0 }, | ||
| 348 | .{ .cpu_arch = .xtensa, .os_tag = .linux, .abi = .none }, | 350 | .{ .cpu_arch = .xtensa, .os_tag = .linux, .abi = .none }, |
| 349 | }; | 351 | }; |
| 350 | 352 |