authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-28 18:48:19-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-28 18:48:19-05:00
log7e3bb00a0e919bdb2a778a7efb648dfc6afa8318
treedee5b850987532f0dd73548736dbb3a0fa3fc706
parent4591236ae1de25e55a7d134d5cc0dcc3e1ad6a6e
signature Commit is signed but in an unrecognized format.

don't choose native ld path when os is non native


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

lib/std/zig/system.zig+2-1
...@@ -274,7 +274,8 @@ pub const NativeTargetInfo = struct {...@@ -274,7 +274,8 @@ pub const NativeTargetInfo = struct {
274 const is_linux = Target.current.os.tag == .linux;274 const is_linux = Target.current.os.tag == .linux;
275 const have_all_info = cross_target.dynamic_linker.get() != null and275 const have_all_info = cross_target.dynamic_linker.get() != null and
276 cross_target.abi != null and (!is_linux or cross_target.abi.?.isGnu());276 cross_target.abi != null and (!is_linux or cross_target.abi.?.isGnu());
277 if (!native_target_has_ld or have_all_info) {277 const os_is_non_native = cross_target.os_tag != null;
278 if (!native_target_has_ld or have_all_info or os_is_non_native) {
278 return defaultAbiAndDynamicLinker(cpu, os, cross_target);279 return defaultAbiAndDynamicLinker(cpu, os, cross_target);
279 }280 }
280 // The current target's ABI cannot be relied on for this. For example, we may build the zig281 // The current target's ABI cannot be relied on for this. For example, we may build the zig