14#include "llvm/Option/ArgList.h"
29 const char *LinkingOutput)
const {
31 ArgStringList CmdArgs;
33 CmdArgs.push_back(
"-o");
36 CmdArgs.push_back(
"-c");
38 if (Args.hasArg(options::OPT_v))
39 CmdArgs.push_back(
"-v");
41 if (Arg *A = Args.getLastArg(options::OPT_g_Group))
42 if (!A->getOption().matches(options::OPT_g0))
43 CmdArgs.push_back(
"-g");
45 if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm,
47 CmdArgs.push_back(
"-fverbose-asm");
49 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler);
51 for (
const auto &II : Inputs)
52 CmdArgs.push_back(II.getFilename());
54 const char *Exec = Args.MakeArgString(
getToolChain().GetProgramPath(
"xcc"));
56 Exec, CmdArgs, Inputs, Output));
63 const char *LinkingOutput)
const {
64 ArgStringList CmdArgs;
68 CmdArgs.push_back(
"-o");
72 if (Args.hasArg(options::OPT_v))
73 CmdArgs.push_back(
"-v");
76 if (Args.hasFlag(options::OPT_fexceptions, options::OPT_fno_exceptions,
78 CmdArgs.push_back(
"-fexceptions");
82 const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath(
"xcc"));
84 Exec, CmdArgs, Inputs, Output));
115 ArgStringList &CC1Args)
const {
116 if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc) ||
117 DriverArgs.hasArg(options::OPT_nostdlibinc))
119 if (
const char *cl_include_dir = getenv(
"XCC_C_INCLUDE_PATH")) {
121 const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator,
'\0'};
122 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
129 ArgStringList &CC1Args,
131 CC1Args.push_back(
"-nostdsysteminc");
133 if (!DriverArgs.hasFlag(options::OPT_fuse_cxa_atexit,
134 options::OPT_fno_use_cxa_atexit,
false))
135 CC1Args.push_back(
"-fno-use-cxa-atexit");
139 const ArgList &DriverArgs, ArgStringList &CC1Args)
const {
140 if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc) ||
141 DriverArgs.hasArg(options::OPT_nostdlibinc) ||
142 DriverArgs.hasArg(options::OPT_nostdincxx))
144 if (
const char *cl_include_dir = getenv(
"XCC_CPLUS_INCLUDE_PATH")) {
146 const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator,
'\0'};
147 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
154 ArgStringList &CmdArgs)
const {
Compilation - A set of tasks to perform for a single driver invocation.
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
The JSON file list parser is used to communicate input to InstallAPI.
static constexpr ResponseFileSupport None()
Returns a ResponseFileSupport indicating that response files are not supported.