# Release binary hygiene: # - Strip symbols & dead code directly in the native linker (avoids broken rust-objcopy rpath # on some macOS toolchains and guarantees zero build warnings across macOS & Linux). # - Note: `--remap-path-prefix` is passed in release builds to avoid leaking local home paths. [target.aarch64-apple-darwin] rustflags = ["-C", "link-arg=-Wl,-S,-x,-dead_strip"] [target.x86_64-apple-darwin] rustflags = ["-C", "link-arg=-Wl,-S,-x,-dead_strip"] [target.aarch64-unknown-linux-musl] rustflags = ["-C", "link-arg=-s", "-C", "link-arg=-Wl,-z,relro,-z,now,-z,noexecstack", "-C", "target-feature=+crt-static"] [target.x86_64-unknown-linux-musl] rustflags = ["-C", "link-arg=-s", "-C", "link-arg=-Wl,-z,relro,-z,now,-z,noexecstack", "-C", "target-feature=+crt-static"] [target.aarch64-unknown-linux-gnu] rustflags = ["-C", "link-arg=-s"] [target.x86_64-unknown-linux-gnu] rustflags = ["-C", "link-arg=-s"]