Disable --icf=safe on MacOS (#839)

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-03-01 01:32:40 +11:00 committed by GitHub
parent 2bf70b6a01
commit af6dc61f3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,9 +106,19 @@ rust-lld := "" #if use-cargo-zigbuild != "" {
# ICF: link-time identical code folding
#
# On windows it works out of the box and on other targets it uses
# On windows it works out of the box and on linux it uses
# rust-lld.
rustc-icf := if for-release != "" { " -C link-arg=-Wl,--icf=safe" } else { "" }
rustc-icf := if for-release != "" {
if target-os == "windows" {
" -C link-arg=-Wl,--icf=safe"
} else if target-os == "linux" {
" -C link-arg=-Wl,--icf=safe"
} else {
""
}
} else {
""
}
# Only enable linker-plugin-lto for release
# Also disable this on windows since it uses msvc.