Skip to content

Instantly share code, notes, and snippets.

@Ujang360
Created January 29, 2020 06:53
Show Gist options
  • Save Ujang360/72145015d8b87b9ca77e60fea4fb2ab9 to your computer and use it in GitHub Desktop.
Save Ujang360/72145015d8b87b9ca77e60fea4fb2ab9 to your computer and use it in GitHub Desktop.
Cargo Config - Static Linking LTO
[target.'cfg(any(unix, windows))']
rustflags = [
"-C", "lto=fat",
"-C", "link-args=-s",
"--emit=asm",
]
[target.'cfg(target_os = macos)']
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment