1e5dd7070Spatrick //===--- TCE.cpp - TCE ToolChain Implementations ----------------*- C++ -*-===//
2e5dd7070Spatrick //
3e5dd7070Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e5dd7070Spatrick // See https://llvm.org/LICENSE.txt for license information.
5e5dd7070Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e5dd7070Spatrick //
7e5dd7070Spatrick //===----------------------------------------------------------------------===//
8e5dd7070Spatrick
9e5dd7070Spatrick #include "TCE.h"
10e5dd7070Spatrick #include "CommonArgs.h"
11e5dd7070Spatrick
12e5dd7070Spatrick using namespace clang::driver;
13e5dd7070Spatrick using namespace clang::driver::toolchains;
14e5dd7070Spatrick using namespace clang;
15e5dd7070Spatrick using namespace llvm::opt;
16e5dd7070Spatrick
17e5dd7070Spatrick /// TCEToolChain - A tool chain using the llvm bitcode tools to perform
18e5dd7070Spatrick /// all subcommands. See http://tce.cs.tut.fi for our peculiar target.
19e5dd7070Spatrick /// Currently does not support anything else but compilation.
20e5dd7070Spatrick
TCEToolChain(const Driver & D,const llvm::Triple & Triple,const ArgList & Args)21e5dd7070Spatrick TCEToolChain::TCEToolChain(const Driver &D, const llvm::Triple &Triple,
22e5dd7070Spatrick const ArgList &Args)
23e5dd7070Spatrick : ToolChain(D, Triple, Args) {
24e5dd7070Spatrick // Path mangling to find libexec
25e5dd7070Spatrick std::string Path(getDriver().Dir);
26e5dd7070Spatrick
27e5dd7070Spatrick Path += "/../libexec";
28e5dd7070Spatrick getProgramPaths().push_back(Path);
29e5dd7070Spatrick }
30e5dd7070Spatrick
~TCEToolChain()31e5dd7070Spatrick TCEToolChain::~TCEToolChain() {}
32e5dd7070Spatrick
IsMathErrnoDefault() const33e5dd7070Spatrick bool TCEToolChain::IsMathErrnoDefault() const { return true; }
34e5dd7070Spatrick
isPICDefault() const35e5dd7070Spatrick bool TCEToolChain::isPICDefault() const { return false; }
36e5dd7070Spatrick
isPIEDefault(const llvm::opt::ArgList & Args) const37*12c85518Srobert bool TCEToolChain::isPIEDefault(const llvm::opt::ArgList &Args) const {
38*12c85518Srobert return false;
39*12c85518Srobert }
40e5dd7070Spatrick
isPICDefaultForced() const41e5dd7070Spatrick bool TCEToolChain::isPICDefaultForced() const { return false; }
42e5dd7070Spatrick
TCELEToolChain(const Driver & D,const llvm::Triple & Triple,const ArgList & Args)43e5dd7070Spatrick TCELEToolChain::TCELEToolChain(const Driver &D, const llvm::Triple& Triple,
44e5dd7070Spatrick const ArgList &Args)
45e5dd7070Spatrick : TCEToolChain(D, Triple, Args) {
46e5dd7070Spatrick }
47e5dd7070Spatrick
~TCELEToolChain()48e5dd7070Spatrick TCELEToolChain::~TCELEToolChain() {}
49