Skip to content

Commit

Permalink
riscv only support split_debuginfo=off for now
Browse files Browse the repository at this point in the history
Disable packed/unpacked options for riscv linux/android. Other riscv targets already only have off option.

Fixes: rust-lang#110224
  • Loading branch information
kxxt committed Jan 31, 2024
1 parent cb4d9a1 commit fea870a
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 fea870a

Please sign in to comment.