[PATCH] D70747: [Fuchsia] Don't fail for unknown architectures

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 15:00:26 PST 2019


phosek created this revision.
phosek added a reviewer: leonardchan.
Herald added subscribers: cfe-commits, s.egerton, simoncook.
Herald added a project: clang.

When selecting the set of default sanitizers, don't fail for unknown
architectures. This may be the case e.g. with x86_64-unknown-fuchsia
-m32 target that's used to build the bootloader.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70747

Files:
  clang/lib/Driver/ToolChains/Fuchsia.cpp


Index: clang/lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -351,10 +351,9 @@
   case llvm::Triple::x86_64:
     Res |= SanitizerKind::SafeStack;
     break;
-  case llvm::Triple::riscv64:
-    break;
   default:
-    llvm_unreachable("invalid architecture");
+    // TODO: Enable SafeStack on RISC-V once tested.
+    break;
   }
   return Res;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70747.231139.patch
Type: text/x-patch
Size: 495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191126/dd1c539d/attachment.bin>


More information about the cfe-commits mailing list