TCE.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //===--- TCE.cpp - TCE 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 "TCE.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. /// TCEToolChain - A tool chain using the llvm bitcode tools to perform
  15. /// all subcommands. See http://tce.cs.tut.fi for our peculiar target.
  16. /// Currently does not support anything else but compilation.
  17. TCEToolChain::TCEToolChain(const Driver &D, const llvm::Triple &Triple,
  18. const ArgList &Args)
  19. : ToolChain(D, Triple, Args) {
  20. // Path mangling to find libexec
  21. std::string Path(getDriver().Dir);
  22. Path += "/../libexec";
  23. getProgramPaths().push_back(Path);
  24. }
  25. TCEToolChain::~TCEToolChain() {}
  26. bool TCEToolChain::IsMathErrnoDefault() const { return true; }
  27. bool TCEToolChain::isPICDefault() const { return false; }
  28. bool TCEToolChain::isPIEDefault(const llvm::opt::ArgList &Args) const {
  29. return false;
  30. }
  31. bool TCEToolChain::isPICDefaultForced() const { return false; }
  32. TCELEToolChain::TCELEToolChain(const Driver &D, const llvm::Triple& Triple,
  33. const ArgList &Args)
  34. : TCEToolChain(D, Triple, Args) {
  35. }
  36. TCELEToolChain::~TCELEToolChain() {}