Don't use --gc-sections on macos

This commit is contained in:
Richard Feldman 2021-03-11 22:03:07 -05:00
parent d253571440
commit beacdfda31

View file

@ -351,7 +351,11 @@ fn link_macos(
// Don't allow LD_ env vars to affect this
.env_clear()
.args(&[
"--gc-sections",
// NOTE: we don't do --gc-sections on macOS because the default
// macOS linker doesn't support it, but it's a performance
// optimization, so if we ever switch to a different linker,
// we'd like to re-enable it on macOS!
// "--gc-sections",
link_type_arg,
"-arch",
target.architecture.to_string().as_str(),