Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

build(linux): enable safe identical code folding

ldm0ef8693519cd4
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 151a8f68f..50bc334cf 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -8,7 +8,12 @@
# This gives up main-executable ASLR and applies to all Cargo profiles because
# target rustflags cannot be scoped to release builds.
[target.'cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))']
-rustflags = ["-C", "link-arg=-Wl,--no-pie"]
+rustflags = [
+ "-C", "link-arg=-Wl,--no-pie",
+ # LLD's safe identical code folding shares duplicate native functions
+ # while preserving observable function address identity.
+ "-C", "link-arg=-Wl,--icf=safe",
+]
# Most local tests spin up direct in-process HTTP servers and assert on
# exact request/response behavior. In this environment, inheriting the