diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-07 00:29:57 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-26 22:00:49 +0200 |
| commit | 8818dc62131979cb29efe7a9f2a2ebd17583cd4a (patch) | |
| tree | 5316af595ee662e250f1f7de73c2bda9ba3f2098 /test/behavior/maximum_minimum.zig | |
| parent | 27c85e5969f01853b2437d56ddc7a7eee9bf35d0 (diff) | |
| download | zig-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 'test/behavior/maximum_minimum.zig')
0 files changed, 0 insertions, 0 deletions
