target: Revert default to the medium code model on LoongArch targets

This reverts commit 35dad14dfb.

Fixes #121289
This commit is contained in:
WANG Rui 2024-02-19 17:43:09 +08:00
parent bea5bebf3d
commit 9c32a7d61b
3 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
use crate::spec::{base, CodeModel, Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
@ -7,7 +7,6 @@ pub fn target() -> Target {
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
arch: "loongarch64".into(),
options: TargetOptions {
code_model: Some(CodeModel::Medium),
cpu: "generic".into(),
features: "+f,+d".into(),
llvm_abiname: "lp64d".into(),

View File

@ -16,7 +16,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
relocation_model: RelocModel::Static,
panic_strategy: PanicStrategy::Abort,
code_model: Some(CodeModel::Medium),
code_model: Some(CodeModel::Small),
..Default::default()
},
}

View File

@ -17,7 +17,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
relocation_model: RelocModel::Static,
panic_strategy: PanicStrategy::Abort,
code_model: Some(CodeModel::Medium),
code_model: Some(CodeModel::Small),
..Default::default()
},
}