diff options
| author | Noratrieb <48135649+Noratrieb@users.noreply.github.com> | 2024-12-25 16:49:20 +0100 |
|---|---|---|
| committer | Noratrieb <48135649+Noratrieb@users.noreply.github.com> | 2024-12-25 16:53:14 +0100 |
| commit | e5bf8b0f354ed6108f2c8f1806946112ed80989d (patch) | |
| tree | e15e048699c0c8ac9666f8222a17b812d1cc83f6 | |
| parent | 32c8a9f49d5b753ccb0aee2fd1f7a232a9c5baf3 (diff) | |
| download | rust-e5bf8b0f354ed6108f2c8f1806946112ed80989d.tar.gz rust-e5bf8b0f354ed6108f2c8f1806946112ed80989d.zip | |
Make x86_64-unknown-linux-gno panic=abort and mark as no_std
Without a standard library, we cannot unwind, so it should be panic=abort by default. Additionally, it does not have std because while it is Linux, it cannot use libc, which std uses today for Linux.
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_none.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_none.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_none.rs index 900dbed205c..2e63ff21572 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_none.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_none.rs @@ -1,4 +1,4 @@ -use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, base}; +use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, StackProbeType, Target, base}; pub(crate) fn target() -> Target { let mut base = base::linux::opts(); @@ -7,6 +7,7 @@ pub(crate) fn target() -> Target { base.stack_probes = StackProbeType::Inline; base.linker_flavor = LinkerFlavor::Gnu(Cc::No, Lld::Yes); base.linker = Some("rust-lld".into()); + base.panic_strategy = PanicStrategy::Abort; Target { llvm_target: "x86_64-unknown-linux-none".into(), @@ -14,7 +15,7 @@ pub(crate) fn target() -> Target { description: None, tier: None, host_tools: None, - std: Some(true), + std: Some(false), }, pointer_width: 64, data_layout: |
