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
9 #include "TCE.h"
10
11 using namespace clang::driver;
12 using namespace clang::driver::toolchains;
13 using namespace clang;
14 using namespace llvm::opt;
15
16 /// TCEToolChain - A tool chain using the llvm bitcode tools to perform
17 /// all subcommands. See http://tce.cs.tut.fi for our peculiar target.
18 /// Currently does not support anything else but compilation.
19
TCEToolChain(const Driver & D,const llvm::Triple & Triple,const ArgList & Args)20 TCEToolChain::TCEToolChain(const Driver &D, const llvm::Triple &Triple,
21 const ArgList &Args)
22 : ToolChain(D, Triple, Args) {
23 // Path mangling to find libexec
24 std::string Path(getDriver().Dir);
25
26 Path += "/../libexec";
27 getProgramPaths().push_back(Path);
28 }
29
~TCEToolChain()30 TCEToolChain::~TCEToolChain() {}
31
IsMathErrnoDefault() const32 bool TCEToolChain::IsMathErrnoDefault() const { return true; }
33
isPICDefault() const34 bool TCEToolChain::isPICDefault() const { return false; }
35
isPIEDefault(const llvm::opt::ArgList & Args) const36 bool TCEToolChain::isPIEDefault(const llvm::opt::ArgList &Args) const {
37 return false;
38 }
39
isPICDefaultForced() const40 bool TCEToolChain::isPICDefaultForced() const { return false; }
41
TCELEToolChain(const Driver & D,const llvm::Triple & Triple,const ArgList & Args)42 TCELEToolChain::TCELEToolChain(const Driver &D, const llvm::Triple& Triple,
43 const ArgList &Args)
44 : TCEToolChain(D, Triple, Args) {
45 }
46
~TCELEToolChain()47 TCELEToolChain::~TCELEToolChain() {}
48