From bd335662062b2624da7b40595dddb74176181b0c Mon Sep 17 00:00:00 2001 From: xermicus Date: Fri, 19 Apr 2024 18:52:34 +0200 Subject: [PATCH] lld-sys: link against lto lib Signed-off-by: xermicus --- crates/lld-sys/Cargo.toml | 6 ------ crates/lld-sys/build.rs | 12 +++++++++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/crates/lld-sys/Cargo.toml b/crates/lld-sys/Cargo.toml index d7eb136..4bef6f7 100644 --- a/crates/lld-sys/Cargo.toml +++ b/crates/lld-sys/Cargo.toml @@ -12,9 +12,3 @@ libc = { workspace = true } [build-dependencies] cc = { workspace = true } - -[target.aarch64-apple-darwin] -rustflags = [ - "-C", "link-arg=-undefined", - "-C", "link-arg=dynamic_lookup", -] diff --git a/crates/lld-sys/build.rs b/crates/lld-sys/build.rs index 20e391a..1ba2b63 100644 --- a/crates/lld-sys/build.rs +++ b/crates/lld-sys/build.rs @@ -20,7 +20,17 @@ fn main() { println!("cargo:rustc-link-search=native={}", llvm_config("--libdir")); - for lib in ["lldELF", "lldCommon", "lldMachO"] { + for lib in [ + "lldELF", + "lldCommon", + "lldMachO", + "LLVMSupport", + "LLVMLinker", + "LLVMCore", + "LLVMLTO", + "LLVMTargetParser", + "LLVMBinaryFormat", + ] { println!("cargo:rustc-link-lib=static={lib}"); }