diff --git a/scripts/zig-cc b/scripts/zig-cc index 4b1293dde..b6d9ebc68 100755 --- a/scripts/zig-cc +++ b/scripts/zig-cc @@ -5,6 +5,10 @@ import os def flag_filter(flag: str) -> bool: + # Workaround for . + if flag == "-latomic": + return False + if flag == "-lc": return False if flag == "-Wl,-melf_i386": @@ -24,6 +28,11 @@ def main(): else: zig_cpu_args = [] + # Disable atomics and use locks instead in OpenSSL. + # Zig toolchains do not provide atomics. + # This is a workaround for + args += ["-DBROKEN_CLANG_ATOMICS"] + subprocess.run( ["zig", "cc", "-target", zig_target, *zig_cpu_args, *args], check=True )