13#include "llvm/Option/ArgList.h"
14#include "llvm/Support/FileSystem.h"
15#include "llvm/Support/Path.h"
24 const llvm::Triple &Triple,
26 :
Linux(D, Triple, Args) {
40 const ArgList &DriverArgs, ArgStringList &CC1Args)
const {
41 if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc))
46 if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
48 llvm::sys::path::append(P,
"include");
52 if (DriverArgs.hasArg(options::OPT_nostdlibinc))
55 const auto &Callback =
Multilibs.includeDirsCallback();
70 const std::string InstalledDir(
getDriver().Dir);
71 std::string SysRootPath =
73 if (llvm::sys::fs::exists(SysRootPath))
81 Arg *A = Args.getLastArg(options::OPT_stdlib_EQ);
83 StringRef
Value = A->getValue();
84 if (
Value !=
"libc++")
86 << A->getAsString(Args);
93 const llvm::opt::ArgList &DriverArgs,
94 llvm::opt::ArgStringList &CC1Args)
const {
95 if (
const auto &Callback =
Multilibs.includeDirsCallback()) {
98 if (llvm::sys::fs::exists(Path)) {
107 ArgStringList &CmdArgs)
const {
109 "Only -lc++ (aka libxx) is supported in this toolchain.");
111 CmdArgs.push_back(
"-lc++");
112 if (Args.hasArg(options::OPT_fexperimental_library))
113 CmdArgs.push_back(
"-lc++experimental");
114 CmdArgs.push_back(
"-lc++abi");
115 CmdArgs.push_back(
"-lunwind");
120 bool IsFortran)
const {
122 llvm::sys::path::append(Path,
SelectedMultilibs.back().osSuffix(),
"lib" + LibSuffix,
136 llvm::sys::path::append(
137 Path, Twine(
"libclang_rt." + Component +
"-" +
"mips" + Suffix));
138 return std::string(Path);
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 Dir
The path the driver executable was in, as invoked from the command line.
bool findMIPSMultilibs(const Driver &D, const llvm::Triple &TargetTriple, StringRef Path, const llvm::opt::ArgList &Args, DetectedMultilibs &Result)
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.