diff options
| author | bors <bors@rust-lang.org> | 2023-06-13 09:13:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-13 09:13:03 +0000 |
| commit | 4bd4e2ea824f4f458cae8917047ebb6b88853fe6 (patch) | |
| tree | 7aff104a4170de7a2433d9a6f0b0692a5a5704b2 /compiler | |
| parent | caeea3f0a21574419254c72b3e0863742d3c6fd0 (diff) | |
| parent | 37b465ff9cb7170a7e9e9da6a1f7bae82ac0b1b2 (diff) | |
| download | rust-4bd4e2ea824f4f458cae8917047ebb6b88853fe6.tar.gz rust-4bd4e2ea824f4f458cae8917047ebb6b88853fe6.zip | |
Auto merge of #112386 - loongarch-rs:reloc-static, r=eholk
loongarch64-unknown-none*: Set default relocation model to static This PR sets the default relocation model to `static` for `loongarch64-unknown-none*` targets. This change aims to streamline the development of the bare-metal project by removing the need for the executable program loader to implement relocation.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_target/src/spec/loongarch64_unknown_none.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs b/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs index 618250591ad..209d481d6f8 100644 --- a/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/loongarch64_unknown_none.rs @@ -1,4 +1,4 @@ -use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; +use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel}; use super::{Target, TargetOptions}; pub fn target() -> Target { @@ -13,8 +13,7 @@ pub fn target() -> Target { linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::No), llvm_abiname: "lp64d".into(), max_atomic_width: Some(64), - position_independent_executables: true, - static_position_independent_executables: true, + relocation_model: RelocModel::Static, panic_strategy: PanicStrategy::Abort, code_model: Some(CodeModel::Small), ..Default::default() 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 23123d7630c..93df4221e61 100644 --- a/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/loongarch64_unknown_none_softfloat.rs @@ -1,4 +1,4 @@ -use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; +use super::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel}; use super::{Target, TargetOptions}; pub fn target() -> Target { @@ -14,8 +14,7 @@ pub fn target() -> Target { linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::No), llvm_abiname: "lp64s".into(), max_atomic_width: Some(64), - position_independent_executables: true, - static_position_independent_executables: true, + relocation_model: RelocModel::Static, panic_strategy: PanicStrategy::Abort, code_model: Some(CodeModel::Small), ..Default::default() |
