authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2019-11-26 21:36:57+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2019-11-26 22:11:04+02:00
log798d05dd02a1c350c1ae48b25b84c0b88db9f449
treee15ab9ae3e5e1e1b68ab2ae25d7ef5a4587a5f7f
parent128034481ab6eb02da4114b4d49ec3cfd4f8451c
signaturelock-open Commit is signed but in an unrecognized format.

add workaround for #3190


2 files changed, 6 insertions(+), 2 deletions(-)

src-self-hosted/link.zig+3-1
...@@ -58,7 +58,8 @@ pub fn link(comp: *Compilation) !void {...@@ -58,7 +58,8 @@ pub fn link(comp: *Compilation) !void {
58 try ctx.args.append("lld");58 try ctx.args.append("lld");
5959
60 if (comp.haveLibC()) {60 if (comp.haveLibC()) {
61 ctx.libc = ctx.comp.override_libc orelse blk: {61 // TODO https://github.com/ziglang/zig/issues/3190
62 var libc = ctx.comp.override_libc orelse blk: {
62 switch (comp.target) {63 switch (comp.target) {
63 Target.Native => {64 Target.Native => {
64 break :blk comp.zig_compiler.getNativeLibC() catch return error.LibCRequiredButNotProvidedOrFound;65 break :blk comp.zig_compiler.getNativeLibC() catch return error.LibCRequiredButNotProvidedOrFound;
...@@ -66,6 +67,7 @@ pub fn link(comp: *Compilation) !void {...@@ -66,6 +67,7 @@ pub fn link(comp: *Compilation) !void {
66 else => return error.LibCRequiredButNotProvidedOrFound,67 else => return error.LibCRequiredButNotProvidedOrFound,
67 }68 }
68 };69 };
70 ctx.libc = libc;
69 }71 }
7072
71 try constructLinkerArgs(&ctx);73 try constructLinkerArgs(&ctx);
src-self-hosted/type.zig+3-1
...@@ -726,8 +726,10 @@ pub const Type = struct {...@@ -726,8 +726,10 @@ pub const Type = struct {
726 switch (key.alignment) {726 switch (key.alignment) {
727 .Abi => {},727 .Abi => {},
728 .Override => |alignment| {728 .Override => |alignment| {
729 // TODO https://github.com/ziglang/zig/issues/3190
730 var align_spill = alignment;
729 const abi_align = try key.child_type.getAbiAlignment(comp);731 const abi_align = try key.child_type.getAbiAlignment(comp);
730 if (abi_align == alignment) {732 if (abi_align == align_spill) {
731 normal_key.alignment = .Abi;733 normal_key.alignment = .Abi;
732 }734 }
733 },735 },