[PATCH] D144998: [llvm] Prevent building for riscv32-unknown-fuchsia

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 11:43:28 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfa6aadd6cb68: [llvm] Prevent building for riscv32-unknown-fuchsia (authored by leonardchan).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144998/new/

https://reviews.llvm.org/D144998

Files:
  llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
  llvm/test/CodeGen/RISCV/rv32-fuchsia.ll


Index: llvm/test/CodeGen/RISCV/rv32-fuchsia.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/RISCV/rv32-fuchsia.ll
@@ -0,0 +1,6 @@
+; RUN: not --crash llc -mtriple=riscv32-unknown-fuchsia < %s 2>&1 | FileCheck %s
+
+; CHECK: LLVM ERROR: Fuchsia is only supported for 64-bit
+define void @nothing() nounwind {
+  ret void
+}
Index: llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+++ llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
@@ -111,6 +111,9 @@
   // RISC-V supports the MachineOutliner.
   setMachineOutliner(true);
   setSupportsDefaultOutlining(true);
+
+  if (TT.isOSFuchsia() && !TT.isArch64Bit())
+    report_fatal_error("Fuchsia is only supported for 64-bit");
 }
 
 const RISCVSubtarget *


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144998.501611.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230301/cb7a103a/attachment.bin>


More information about the llvm-commits mailing list