add workaround for #3190
This commit is contained in:
parent
128034481a
commit
798d05dd02
|
@ -58,7 +58,8 @@ pub fn link(comp: *Compilation) !void {
|
||||||
try ctx.args.append("lld");
|
try ctx.args.append("lld");
|
||||||
|
|
||||||
if (comp.haveLibC()) {
|
if (comp.haveLibC()) {
|
||||||
ctx.libc = ctx.comp.override_libc orelse blk: {
|
// TODO https://github.com/ziglang/zig/issues/3190
|
||||||
|
var libc = ctx.comp.override_libc orelse blk: {
|
||||||
switch (comp.target) {
|
switch (comp.target) {
|
||||||
Target.Native => {
|
Target.Native => {
|
||||||
break :blk comp.zig_compiler.getNativeLibC() catch return error.LibCRequiredButNotProvidedOrFound;
|
break :blk comp.zig_compiler.getNativeLibC() catch return error.LibCRequiredButNotProvidedOrFound;
|
||||||
|
@ -66,6 +67,7 @@ pub fn link(comp: *Compilation) !void {
|
||||||
else => return error.LibCRequiredButNotProvidedOrFound,
|
else => return error.LibCRequiredButNotProvidedOrFound,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
ctx.libc = libc;
|
||||||
}
|
}
|
||||||
|
|
||||||
try constructLinkerArgs(&ctx);
|
try constructLinkerArgs(&ctx);
|
||||||
|
|
|
@ -726,8 +726,10 @@ pub const Type = struct {
|
||||||
switch (key.alignment) {
|
switch (key.alignment) {
|
||||||
.Abi => {},
|
.Abi => {},
|
||||||
.Override => |alignment| {
|
.Override => |alignment| {
|
||||||
|
// TODO https://github.com/ziglang/zig/issues/3190
|
||||||
|
var align_spill = alignment;
|
||||||
const abi_align = try key.child_type.getAbiAlignment(comp);
|
const abi_align = try key.child_type.getAbiAlignment(comp);
|
||||||
if (abi_align == alignment) {
|
if (abi_align == align_spill) {
|
||||||
normal_key.alignment = .Abi;
|
normal_key.alignment = .Abi;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user