From f7aeca45b23c09522afd9f88c6782b2a2acd0783 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 26 Nov 2019 14:56:31 -0800 Subject: [PATCH] [Fuchsia] Don't fail for unknown architectures 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. Differential Revision: https://reviews.llvm.org/D70747 --- clang/lib/Driver/ToolChains/Fuchsia.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp index 9bea0b1..4c5d400 100644 --- a/clang/lib/Driver/ToolChains/Fuchsia.cpp +++ b/clang/lib/Driver/ToolChains/Fuchsia.cpp @@ -351,10 +351,9 @@ SanitizerMask Fuchsia::getDefaultSanitizers() const { 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; } -- 2.7.4