From f01f074d2629889520d899afff3801d27278d14c Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 23 Dec 2024 18:36:55 +0800 Subject: [PATCH] Use `lld` instead of `lld-link` when using `clang` --- src/compiler/clang.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/compiler/clang.rs b/src/compiler/clang.rs index b804be1..b2762f3 100644 --- a/src/compiler/clang.rs +++ b/src/compiler/clang.rs @@ -84,8 +84,6 @@ impl Clang { let mut rustflags = get_rustflags(&workdir, target)?.unwrap_or_default(); rustflags.flags.extend([ - "-C".to_string(), - "linker-flavor=lld-link".to_string(), "-C".to_string(), "link-arg=-defaultlib:oldnames".to_string(), ]); @@ -263,18 +261,16 @@ set(CMAKE_SYSTEM_PROCESSOR {processor}) set(CMAKE_C_COMPILER clang CACHE FILEPATH "") set(CMAKE_CXX_COMPILER clang++ CACHE FILEPATH "") -set(CMAKE_LINKER lld-link CACHE FILEPATH "") set(CMAKE_RC_COMPILER llvm-rc CACHE FILEPATH "") set(COMPILE_FLAGS --target={target_no_vendor} - -fuse-ld=lld-link + -fuse-ld=lld -I{dir}/include -I{dir}/include/c++/stl) set(LINK_FLAGS - /manifest:no - -libpath:"{dir}/lib/{target_unknown_vendor}") + -L"{dir}/lib/{target_unknown_vendor}") "#, dir = sysroot_dir, );