[clang] f7aeca4 - [Fuchsia] Don't fail for unknown architectures

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 19:17:01 PST 2019


Author: Petr Hosek
Date: 2019-11-26T19:16:40-08:00
New Revision: f7aeca45b23c09522afd9f88c6782b2a2acd0783

URL: https://github.com/llvm/llvm-project/commit/f7aeca45b23c09522afd9f88c6782b2a2acd0783
DIFF: https://github.com/llvm/llvm-project/commit/f7aeca45b23c09522afd9f88c6782b2a2acd0783.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp
index 9bea0b15c873..4c5d4003f144 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;
 }


        


More information about the cfe-commits mailing list