mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
compiler: Classify libatomic as an alias for compiler-rt.
This is a library that ships with GCC and provides fallback implementations of atomic intrinsics where necessary. Since we do the same in our compiler-rt implementation, and since some build systems insist on passing -latomic even for Clang (which zig cc masquerades as), just satisfy this dependency by way of compiler-rt. Closes #22165.
This commit is contained in:
parent
c9d6f8b505
commit
f8372d030e
@ -267,7 +267,9 @@ pub fn classifyCompilerRtLibName(target: std.Target, name: []const u8) CompilerR
|
||||
// the linker unable to find `_Unwind_RaiseException` and other related symbols.
|
||||
return .both;
|
||||
}
|
||||
if (std.mem.eql(u8, name, "compiler_rt")) {
|
||||
if (std.mem.eql(u8, name, "compiler_rt") or
|
||||
std.mem.eql(u8, name, "atomic"))
|
||||
{
|
||||
return .only_compiler_rt;
|
||||
}
|
||||
if (std.mem.eql(u8, name, "unwind")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user