Skip to content

Commit

Permalink
Use lld instead of lld-link when using clang
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 23, 2024
1 parent fcc0f78 commit f01f074
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/compiler/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
]);
Expand Down Expand Up @@ -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,
);
Expand Down

0 comments on commit f01f074

Please sign in to comment.