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