| author | |
| committer | |
| log | 3cf302a71d50114c44cedbe0114e513063b93302 |
| tree | 989471fe12def0924eeea992163550fd3bc39c87 |
| parent | b1eb831aba6eec78f367053200007c867817e811 |
| signature |
3 files changed, 5 insertions(+), 6 deletions(-)
lib/std/debug.zig+1-1| ... | @@ -1254,7 +1254,7 @@ pub const DebugInfo = struct { | ... | @@ -1254,7 +1254,7 @@ pub const DebugInfo = struct { |
| 1254 | if (context.address >= seg_start and context.address < seg_end) { | 1254 | if (context.address >= seg_start and context.address < seg_end) { |
| 1255 | // Android libc uses NULL instead of an empty string to mark the | 1255 | // Android libc uses NULL instead of an empty string to mark the |
| 1256 | // main program | 1256 | // main program |
| 1257 | context.name = if (info.dlpi_name) |dlpi_name| mem.spanZ(dlpi_name) else ""; | 1257 | context.name = mem.spanZ(info.dlpi_name) orelse ""; |
| 1258 | context.base_address = info.dlpi_addr; | 1258 | context.base_address = info.dlpi_addr; |
| 1259 | // Stop the iteration | 1259 | // Stop the iteration |
| 1260 | return error.Found; | 1260 | return error.Found; |
lib/std/os.zig+1-1| ... | @@ -1078,7 +1078,7 @@ pub fn execvpe_expandArg0( | ... | @@ -1078,7 +1078,7 @@ pub fn execvpe_expandArg0( |
| 1078 | mem.set(?[*:0]u8, argv_buf, null); | 1078 | mem.set(?[*:0]u8, argv_buf, null); |
| 1079 | defer { | 1079 | defer { |
| 1080 | for (argv_buf) |arg| { | 1080 | for (argv_buf) |arg| { |
| 1081 | const arg_buf = if (arg) |ptr| mem.spanZ(ptr) else break; | 1081 | const arg_buf = mem.spanZ(arg) orelse break; |
| 1082 | allocator.free(arg_buf); | 1082 | allocator.free(arg_buf); |
| 1083 | } | 1083 | } |
| 1084 | allocator.free(argv_buf); | 1084 | allocator.free(argv_buf); |
src-self-hosted/stage2.zig+3-4| ... | @@ -689,12 +689,11 @@ fn stage2CrossTarget( | ... | @@ -689,12 +689,11 @@ fn stage2CrossTarget( |
| 689 | mcpu_oz: ?[*:0]const u8, | 689 | mcpu_oz: ?[*:0]const u8, |
| 690 | dynamic_linker_oz: ?[*:0]const u8, | 690 | dynamic_linker_oz: ?[*:0]const u8, |
| 691 | ) !CrossTarget { | 691 | ) !CrossTarget { |
| 692 | const zig_triple = if (zig_triple_oz) |zig_triple_z| mem.spanZ(zig_triple_z) else "native"; | 692 | const mcpu = mem.spanZ(mcpu_oz); |
| 693 | const mcpu = if (mcpu_oz) |mcpu_z| mem.spanZ(mcpu_z) else null; | 693 | const dynamic_linker = mem.spanZ(dynamic_linker_oz); |
| 694 | const dynamic_linker = if (dynamic_linker_oz) |dl_z| mem.spanZ(dl_z) else null; | ||
| 695 | var diags: CrossTarget.ParseOptions.Diagnostics = .{}; | 694 | var diags: CrossTarget.ParseOptions.Diagnostics = .{}; |
| 696 | const target: CrossTarget = CrossTarget.parse(.{ | 695 | const target: CrossTarget = CrossTarget.parse(.{ |
| 697 | .arch_os_abi = zig_triple, | 696 | .arch_os_abi = mem.spanZ(zig_triple_oz) orelse "native", |
| 698 | .cpu_features = mcpu, | 697 | .cpu_features = mcpu, |
| 699 | .dynamic_linker = dynamic_linker, | 698 | .dynamic_linker = dynamic_linker, |
| 700 | .diagnostics = &diags, | 699 | .diagnostics = &diags, |