Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

build: add link args to prevent dso unloading error on GNU targets (#10602)

Brooooooklyna486174669d2
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 84683d84e3..b0923812e9 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -6,3 +6,9 @@ rustflags = ["-C", "target-feature=+crt-static"]
rustflags = ["-C", "link-args=-Wl,--warn-unresolved-symbols"]
[target.'cfg(target_os = "macos")']
rustflags = ["-C", "link-args=-all_load"]
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21032
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21031
+# https://github.com/rust-lang/rust/issues/134820
+# pthread_key_create() destructors and segfault after a DSO unloading
+[target.'cfg(all(target_env = "gnu", not(target_os = "windows")))']
+rustflags = ["-C", "link-args=-Wl,-z,nodelete"]