mirror of
https://github.com/ziglang/zig.git
synced 2025-12-31 10:33:19 +00:00
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.