Skip to content

Commit 2f68d97

Browse files
committed
Fix ELF flag for RISC-V targets without explicit ABI
1 parent 5ed556e commit 2f68d97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_ssa/src/back/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
283283
// Set the appropriate flag based on ABI
284284
// This needs to match LLVM `RISCVELFStreamer.cpp`
285285
match &*sess.target.llvm_abiname {
286-
"ilp32" | "lp64" => (),
286+
"" | "ilp32" | "lp64" => (),
287287
"ilp32f" | "lp64f" => e_flags |= elf::EF_RISCV_FLOAT_ABI_SINGLE,
288288
"ilp32d" | "lp64d" => e_flags |= elf::EF_RISCV_FLOAT_ABI_DOUBLE,
289289
"ilp32e" => e_flags |= elf::EF_RISCV_RVE,

0 commit comments

Comments
 (0)