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 {
5858 try ctx.args.append("lld");
5959
6060 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: {
6263 switch (comp.target) {
6364 Target.Native => {
6465 break :blk comp.zig_compiler.getNativeLibC() catch return error.LibCRequiredButNotProvidedOrFound;
......@@ -66,6 +67,7 @@ pub fn link(comp: *Compilation) !void {
6667 else => return error.LibCRequiredButNotProvidedOrFound,
6768 }
6869 };
70 ctx.libc = libc;
6971 }
7072
7173 try constructLinkerArgs(&ctx);
src-self-hosted/type.zig+3-1
......@@ -726,8 +726,10 @@ pub const Type = struct {
726726 switch (key.alignment) {
727727 .Abi => {},
728728 .Override => |alignment| {
729 // TODO https://github.com/ziglang/zig/issues/3190
730 var align_spill = alignment;
729731 const abi_align = try key.child_type.getAbiAlignment(comp);
730 if (abi_align == alignment) {
732 if (abi_align == align_spill) {
731733 normal_key.alignment = .Abi;
732734 }
733735 },