mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
build: workaround OpenSSL crate expecting libatomic to be available
This commit is contained in:
@@ -5,6 +5,10 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
def flag_filter(flag: str) -> bool:
|
def flag_filter(flag: str) -> bool:
|
||||||
|
# Workaround for <https://github.com/sfackler/rust-openssl/issues/2043>.
|
||||||
|
if flag == "-latomic":
|
||||||
|
return False
|
||||||
|
|
||||||
if flag == "-lc":
|
if flag == "-lc":
|
||||||
return False
|
return False
|
||||||
if flag == "-Wl,-melf_i386":
|
if flag == "-Wl,-melf_i386":
|
||||||
@@ -24,6 +28,11 @@ def main():
|
|||||||
else:
|
else:
|
||||||
zig_cpu_args = []
|
zig_cpu_args = []
|
||||||
|
|
||||||
|
# Disable atomics and use locks instead in OpenSSL.
|
||||||
|
# Zig toolchains do not provide atomics.
|
||||||
|
# This is a workaround for <https://github.com/deltachat/deltachat-core-rust/issues/4799>
|
||||||
|
args += ["-DBROKEN_CLANG_ATOMICS"]
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["zig", "cc", "-target", zig_target, *zig_cpu_args, *args], check=True
|
["zig", "cc", "-target", zig_target, *zig_cpu_args, *args], check=True
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user