Contiki.cpp 926 B

123456789101112131415161718192021222324252627
  1. //===--- Contiki.cpp - Contiki ToolChain Implementations --------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #include "Contiki.h"
  9. #include "CommonArgs.h"
  10. using namespace clang::driver;
  11. using namespace clang::driver::toolchains;
  12. using namespace clang;
  13. using namespace llvm::opt;
  14. Contiki::Contiki(const Driver &D, const llvm::Triple &Triple,
  15. const ArgList &Args)
  16. : Generic_ELF(D, Triple, Args) {}
  17. SanitizerMask Contiki::getSupportedSanitizers() const {
  18. const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
  19. SanitizerMask Res = ToolChain::getSupportedSanitizers();
  20. if (IsX86)
  21. Res |= SanitizerKind::SafeStack;
  22. return Res;
  23. }