| author | |
| committer | |
| log | 4661705a0e9b28ea008ffb85258daf1d5510b054 |
| tree | 078d340cf691e574bf2ec1ec49e4c1582f58e391 |
| parent | 3450809e3db14226b7f8e57bdfa7fde590e803d8 |
| signature | Signed by PGP key B5690EEEBB952194 |
Xcode requires target arm64_32 (aarch64-watchos-ilp32) in order to
build code for Apple Watches. This commit fixes compilation errors
that appear when compiling with that target.2 files changed, 6 insertions(+), 4 deletions(-)
lib/std/debug.zig+1-1| ... | ... | @@ -656,7 +656,7 @@ pub const StackIterator = struct { |
| 656 | 656 | // The implementation of DWARF unwinding on aarch64-macos is not complete. However, Apple mandates that |
| 657 | 657 | // the frame pointer register is always used, so on this platform we can safely use the FP-based unwinder. |
| 658 | 658 | if (builtin.target.isDarwin() and native_arch == .aarch64) |
| 659 | return init(first_address, context.mcontext.ss.fp); | |
| 659 | return init(first_address, @truncate(context.mcontext.ss.fp)); | |
| 660 | 660 | |
| 661 | 661 | if (SelfInfo.supports_unwinding) { |
| 662 | 662 | var iterator = init(first_address, null); |
lib/std/debug/SelfInfo.zig+5-3| ... | ... | @@ -184,10 +184,12 @@ fn lookupModuleDyld(self: *SelfInfo, address: usize) !*Module { |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | for (cmd.getSections()) |sect| { |
| 187 | const sect_addr: usize = @intCast(sect.addr); | |
| 188 | const sect_size: usize = @intCast(sect.size); | |
| 187 | 189 | if (mem.eql(u8, "__unwind_info", sect.sectName())) { |
| 188 | unwind_info = @as([*]const u8, @ptrFromInt(sect.addr + vmaddr_slide))[0..sect.size]; | |
| 190 | unwind_info = @as([*]const u8, @ptrFromInt(sect_addr + vmaddr_slide))[0..sect_size]; | |
| 189 | 191 | } else if (mem.eql(u8, "__eh_frame", sect.sectName())) { |
| 190 | eh_frame = @as([*]const u8, @ptrFromInt(sect.addr + vmaddr_slide))[0..sect.size]; | |
| 192 | eh_frame = @as([*]const u8, @ptrFromInt(sect_addr + vmaddr_slide))[0..sect_size]; | |
| 191 | 193 | } |
| 192 | 194 | } |
| 193 | 195 | |
| ... | ... | @@ -590,7 +592,7 @@ pub const Module = switch (native_os) { |
| 590 | 592 | const section_bytes = try Dwarf.chopSlice(mapped_mem, sect.offset, sect.size); |
| 591 | 593 | sections[section_index.?] = .{ |
| 592 | 594 | .data = section_bytes, |
| 593 | .virtual_address = sect.addr, | |
| 595 | .virtual_address = @intCast(sect.addr), | |
| 594 | 596 | .owned = false, |
| 595 | 597 | }; |
| 596 | 598 | } |