Skip to content

Commit 5066ab1

Browse files
overdrivenpotatoAmanieu
authored andcommitted
Fix building libcore for the Sony PSP
Building the MIPS MSA module for non-fp64 targets fails with an LLVM error. This commit blacklists PSP targets from MSA support in order to fix building libcore.
1 parent 429864e commit 5066ab1

File tree

1 file changed

+7
-2
lines changed
  • crates/core_arch/src/mips

1 file changed

+7
-2
lines changed

crates/core_arch/src/mips/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
//! MIPS
22
3-
mod msa;
4-
pub use self::msa::*;
3+
// Building this module (even if unused) for non-fp64 targets such as the Sony
4+
// PSP fails with an LLVM error. There doesn't seem to be a good way to detect
5+
// fp64 support as it is sometimes implied by the target cpu, so
6+
// `#[cfg(target_feature = "fp64")]` will unfortunately not work. This is a
7+
// fairly conservative workaround that only disables MSA intrinsics for the PSP.
8+
#[cfg(not(target_os = "psp"))] mod msa;
9+
#[cfg(not(target_os = "psp"))] pub use self::msa::*;
510

611
#[cfg(test)]
712
use stdarch_test::assert_instr;

0 commit comments

Comments
 (0)