From 7e0856a93568432afe292d5f2eca43a4f6e7be04 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Tue, 18 Jun 2024 21:45:45 +1000 Subject: [PATCH] Update justfile to use lld on macOS and Linux When cargo-zigbuild is not used Signed-off-by: Jiahao XU --- justfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/justfile b/justfile index 97e0201e..500be54f 100644 --- a/justfile +++ b/justfile @@ -131,13 +131,13 @@ rustc-miropt := "" # if for-release != "" { " -Z mir-opt-level=4" } else { "" } # # If cargo-zigbuild is used, then it will provide the lld linker. # This option is disabled on windows since it not supported. -rust-lld := "" #if use-cargo-zigbuild != "" { -#"" -#} else if target-os != "windows" { -#" -Z gcc-ld=lld" -#} else { -#"" -#} +rust-lld := if use-cargo-zigbuild != "" { + "" +} else if target-os != "windows" { + " -C link-arg=-fuse-ld=lld" +} else { + "" +} # ICF: link-time identical code folding #