mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #154566 - heiher:loong-mcount-sym, r=chenyukang
loongarch: use "_mcount" as the default mcount symbol Set the `mcount` field to "_mcount" for all LoongArch targets to match Clang/GCC behavior [1]. This fixes linking failures when using `-Z instrument-mcount`, where the runtime expects "_mcount" instead of "mcount". [1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/LoongArch.h#L60
This commit is contained in:
@@ -22,6 +22,7 @@ pub(crate) fn target() -> Target {
|
||||
linker: Some("rust-lld".into()),
|
||||
llvm_abiname: LlvmAbi::Ilp32d,
|
||||
max_atomic_width: Some(32),
|
||||
mcount: "_mcount".into(),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
..Default::default()
|
||||
|
||||
@@ -23,6 +23,7 @@ pub(crate) fn target() -> Target {
|
||||
linker: Some("rust-lld".into()),
|
||||
llvm_abiname: LlvmAbi::Ilp32s,
|
||||
max_atomic_width: Some(32),
|
||||
mcount: "_mcount".into(),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
..Default::default()
|
||||
|
||||
@@ -20,6 +20,7 @@ pub(crate) fn target() -> Target {
|
||||
features: "+f,+d,+lsx,+relax".into(),
|
||||
llvm_abiname: LlvmAbi::Lp64d,
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
supported_sanitizers: SanitizerSet::ADDRESS
|
||||
| SanitizerSet::CFI
|
||||
| SanitizerSet::LEAK
|
||||
|
||||
@@ -20,6 +20,7 @@ pub(crate) fn target() -> Target {
|
||||
features: "+f,+d,+lsx,+relax".into(),
|
||||
llvm_abiname: LlvmAbi::Lp64d,
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
crt_static_default: false,
|
||||
supported_sanitizers: SanitizerSet::ADDRESS
|
||||
| SanitizerSet::CFI
|
||||
|
||||
@@ -20,6 +20,7 @@ pub(crate) fn target() -> Target {
|
||||
features: "+f,+d,+lsx,+relax".into(),
|
||||
llvm_abiname: LlvmAbi::Lp64d,
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
supported_sanitizers: SanitizerSet::ADDRESS
|
||||
| SanitizerSet::CFI
|
||||
| SanitizerSet::LEAK
|
||||
|
||||
@@ -22,6 +22,7 @@ pub(crate) fn target() -> Target {
|
||||
linker: Some("rust-lld".into()),
|
||||
llvm_abiname: LlvmAbi::Lp64d,
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
code_model: Some(CodeModel::Medium),
|
||||
|
||||
@@ -23,6 +23,7 @@ pub(crate) fn target() -> Target {
|
||||
linker: Some("rust-lld".into()),
|
||||
llvm_abiname: LlvmAbi::Lp64s,
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
code_model: Some(CodeModel::Medium),
|
||||
|
||||
Reference in New Issue
Block a user