diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-12-06 14:07:15 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-12-06 14:57:19 +0100 |
| commit | 37a34b54afee183f397cf708ac8d074fa7cc92d6 (patch) | |
| tree | 87343a9fd1de152ca6448f6a09ea0eb71e5331d2 /src/target.zig | |
| parent | f8372d030e50b6eec50fd21a387b4d875f81a178 (diff) | |
| download | zig-37a34b54afee183f397cf708ac8d074fa7cc92d6.tar.gz zig-37a34b54afee183f397cf708ac8d074fa7cc92d6.zip | |
compiler: Recognize libgcc_s regardless of target ABI.
The real libgcc_s is a compiler-provided library; it works just fine with both
glibc and musl. There's no reason that I can see for this check to be limited to
glibc-based targets.
Diffstat (limited to 'src/target.zig')
| -rw-r--r-- | src/target.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target.zig b/src/target.zig index ae3a8e7ecc..56069c26b2 100644 --- a/src/target.zig +++ b/src/target.zig @@ -260,8 +260,8 @@ pub fn supportsReturnAddress(target: std.Target) bool { pub const CompilerRtClassification = enum { none, only_compiler_rt, only_libunwind, both }; -pub fn classifyCompilerRtLibName(target: std.Target, name: []const u8) CompilerRtClassification { - if (target.abi.isGnu() and std.mem.eql(u8, name, "gcc_s")) { +pub fn classifyCompilerRtLibName(name: []const u8) CompilerRtClassification { + if (std.mem.eql(u8, name, "gcc_s")) { // libgcc_s includes exception handling functions, so if linking this library // is requested, zig needs to instead link libunwind. Otherwise we end up with // the linker unable to find `_Unwind_RaiseException` and other related symbols. |
