diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs b/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs index 209d481d6f8..dbc96d68eae 100644 --- a/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs @@ -10,7 +10,8 @@ pub fn target() -> Target { options: TargetOptions { cpu: "generic".into(), features: "+f,+d".into(), - linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::No), + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), + linker: Some("rust-lld".into()), llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs index f444a7f24bb..c4d5c7bc44c 100644 --- a/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs @@ -11,7 +11,8 @@ pub fn target() -> Target { cpu: "generic".into(), features: "-f,-d".into(), abi: "softfloat".into(), - linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::No), + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), + linker: Some("rust-lld".into()), llvm_abiname: "lp64s".into(), max_atomic_width: Some(64), relocation_model: RelocModel::Static,