mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
std.zig.system: Fix detectAbiAndDynamicLinker() for non-Linux/Hurd ELF hosts.
Since we exclude Abi.none from the list of ABIs to be tested, it means that Abi.gnu, which happens to be the first in the list, always gets picked for hosts where the dynamic linker path does not depend on the ABI component of the triple. Such hosts include all the BSDs, Haiku, Serenity, Solaris, etc. To fix this, use DynamicLinker.kind() to determine whether this whole exercise even makes sense. If it doesn't, as is the case on every OS other than Linux and Hurd, we'll just fall back to Abi.default() which will try to pick a sensible default based on the arch and OS components. This detection logic still has plenty of room for improvement, but is at least a notable step up from confusingly detecting Abi.gnu ~everywhere. Closes #9089.
This commit is contained in:
parent
27c85e5969
commit
8818dc6213
1 changed files with 25 additions and 18 deletions
Loading…
Add table
Add a link
Reference in a new issue