diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-02-28 18:48:19 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-02-28 18:48:19 -0500 |
| commit | 7e3bb00a0e919bdb2a778a7efb648dfc6afa8318 (patch) | |
| tree | dee5b850987532f0dd73548736dbb3a0fa3fc706 /lib/std | |
| parent | 4591236ae1de25e55a7d134d5cc0dcc3e1ad6a6e (diff) | |
| download | zig-7e3bb00a0e919bdb2a778a7efb648dfc6afa8318.tar.gz zig-7e3bb00a0e919bdb2a778a7efb648dfc6afa8318.zip | |
don't choose native ld path when os is non native
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/zig/system.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig index 5ff17bae23..aa8def32a9 100644 --- a/lib/std/zig/system.zig +++ b/lib/std/zig/system.zig @@ -274,7 +274,8 @@ pub const NativeTargetInfo = struct { const is_linux = Target.current.os.tag == .linux; const have_all_info = cross_target.dynamic_linker.get() != null and cross_target.abi != null and (!is_linux or cross_target.abi.?.isGnu()); - if (!native_target_has_ld or have_all_info) { + const os_is_non_native = cross_target.os_tag != null; + if (!native_target_has_ld or have_all_info or os_is_non_native) { return defaultAbiAndDynamicLinker(cpu, os, cross_target); } // The current target's ABI cannot be relied on for this. For example, we may build the zig |
