aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-10-07 00:29:57 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2024-10-26 22:00:49 +0200
commit8818dc62131979cb29efe7a9f2a2ebd17583cd4a (patch)
tree5316af595ee662e250f1f7de73c2bda9ba3f2098 /src/codegen/llvm.zig
parent27c85e5969f01853b2437d56ddc7a7eee9bf35d0 (diff)
downloadzig-8818dc62131979cb29efe7a9f2a2ebd17583cd4a.tar.gz
zig-8818dc62131979cb29efe7a9f2a2ebd17583cd4a.zip
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.
Diffstat (limited to 'src/codegen/llvm.zig')
0 files changed, 0 insertions, 0 deletions