15#include "llvm/Option/ArgList.h"
16#include "llvm/Support/FileSystem.h"
17#include "llvm/Support/Path.h"
26 const llvm::Triple &Triple,
28 :
Linux(D, Triple, Args) {
42 const ArgList &DriverArgs, ArgStringList &CC1Args)
const {
43 if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc))
48 if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
50 llvm::sys::path::append(
P,
"include");
54 if (DriverArgs.hasArg(options::OPT_nostdlibinc))
73 const std::string InstalledDir(
getDriver().getInstalledDir());
74 std::string SysRootPath =
76 if (llvm::sys::fs::exists(SysRootPath))
84 Arg *A = Args.getLastArg(options::OPT_stdlib_EQ);
86 StringRef
Value = A->getValue();
87 if (
Value !=
"libc++")
89 << A->getAsString(Args);
96 const llvm::opt::ArgList &DriverArgs,
97 llvm::opt::ArgStringList &CC1Args)
const {
101 if (llvm::sys::fs::exists(Path)) {
110 ArgStringList &CmdArgs)
const {
112 "Only -lc++ (aka libxx) is supported in this toolchain.");
114 CmdArgs.push_back(
"-lc++");
115 if (Args.hasArg(options::OPT_fexperimental_library))
116 CmdArgs.push_back(
"-lc++experimental");
117 CmdArgs.push_back(
"-lc++abi");
118 CmdArgs.push_back(
"-lunwind");
125 llvm::sys::path::append(Path,
SelectedMultilibs.back().osSuffix(),
"lib" + LibSuffix,
139 llvm::sys::path::append(
140 Path, Twine(
"libclang_rt." + Component +
"-" +
"mips" + Suffix));
141 return std::string(Path.str());
The base class of the type hierarchy.
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
std::string SysRoot
sysroot, if present
DiagnosticBuilder Diag(unsigned DiagID) const
std::string ResourceDir
The path to the compiler resource directory.
const char * getInstalledDir() const
Get the path to where the clang executable was installed.
const IncludeDirsFunc & includeDirsCallback() const
bool findMIPSMultilibs(const Driver &D, const llvm::Triple &TargetTriple, StringRef Path, const llvm::opt::ArgList &Args, DetectedMultilibs &Result)
@ Result
The result type of a method or function.