Skip to content

Commit 5ce4994

Browse files
committed
Refer v9 target feature for sparc in create_object_file
1 parent 4dab43e commit 5ce4994

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_codegen_ssa/src/back/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
212212
"riscv32" => (Architecture::Riscv32, None),
213213
"riscv64" => (Architecture::Riscv64, None),
214214
"sparc" => {
215-
if sess.target.options.cpu == "v9" {
215+
if sess.unstable_target_features.contains(&sym::v9) {
216216
// Target uses V8+, aka EM_SPARC32PLUS, aka 64-bit V9 but in 32-bit mode
217217
(Architecture::Sparc32Plus, None)
218218
} else {

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,6 +2111,7 @@ symbols! {
21112111
usize_legacy_fn_max_value,
21122112
usize_legacy_fn_min_value,
21132113
usize_legacy_mod,
2114+
v9,
21142115
va_arg,
21152116
va_copy,
21162117
va_end,

0 commit comments

Comments
 (0)