Skip to content

Commit

Permalink
Rollup merge of rust-lang#120518 - kxxt:riscv-split-debug-info, r=com…
Browse files Browse the repository at this point in the history
…piler-errors

riscv only supports split_debuginfo=off for now

Disable packed/unpacked options for riscv linux/android. Other riscv targets already only have the off option.

The packed/unpacked options might be supported in the future. See upstream issue for more details:
llvm/llvm-project#56642

Fixes rust-lang#110224
  • Loading branch information
matthiaskrgr committed Feb 5, 2024
2 parents e3caa30 471af8c commit 83bc10b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 1,6 @@
use crate::spec::{base, CodeModel, Target, TargetOptions};
use std::borrow::Cow;

use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,6 14,7 @@ pub fn target() -> Target {
features: " m, a, f, d, c".into(),
llvm_abiname: "ilp32d".into(),
max_atomic_width: Some(32),
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
..base::linux_gnu::opts()
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 1,6 @@
use crate::spec::{base, CodeModel, Target, TargetOptions};
use std::borrow::Cow;

use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,6 14,7 @@ pub fn target() -> Target {
features: " m, a, f, d, c".into(),
llvm_abiname: "ilp32d".into(),
max_atomic_width: Some(32),
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
..base::linux_musl::opts()
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 1,6 @@
use crate::spec::{base, CodeModel, SanitizerSet, Target, TargetOptions};
use std::borrow::Cow;

use crate::spec::{base, CodeModel, SanitizerSet, SplitDebuginfo, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -13,6 15,7 @@ pub fn target() -> Target {
llvm_abiname: "lp64d".into(),
supported_sanitizers: SanitizerSet::ADDRESS,
max_atomic_width: Some(64),
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
..base::android::opts()
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 1,6 @@
use crate::spec::{base, CodeModel, Target, TargetOptions};
use std::borrow::Cow;

use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,6 14,7 @@ pub fn target() -> Target {
features: " m, a, f, d, c".into(),
llvm_abiname: "lp64d".into(),
max_atomic_width: Some(64),
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
..base::linux_gnu::opts()
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 1,6 @@
use crate::spec::{base, CodeModel, Target, TargetOptions};
use std::borrow::Cow;

use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,6 14,7 @@ pub fn target() -> Target {
features: " m, a, f, d, c".into(),
llvm_abiname: "lp64d".into(),
max_atomic_width: Some(64),
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
..base::linux_musl::opts()
},
}
Expand Down

0 comments on commit 83bc10b

Please sign in to comment.