14#include "llvm/Option/ArgList.h"
15#include "llvm/Support/FileSystem.h"
16#include "llvm/Support/Path.h"
81 ArgStringList &CC1Args)
const {
82 if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc))
85 if (DriverArgs.hasArg(options::OPT_nobuiltininc) &&
86 DriverArgs.hasArg(options::OPT_nostdlibinc))
89 if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
91 llvm::sys::path::append(
P,
"include");
95 if (!DriverArgs.hasArg(options::OPT_nostdlibinc)) {
96 if (
const char *cl_include_dir = getenv(
"NCC_C_INCLUDE_PATH")) {
98 const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator,
'\0'};
99 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
104 getDriver().SysRoot +
"/opt/nec/ve/include");
110 ArgStringList &CC1Args,
112 CC1Args.push_back(
"-nostdsysteminc");
113 bool UseInitArrayDefault =
true;
114 if (!DriverArgs.hasFlag(options::OPT_fuse_init_array,
115 options::OPT_fno_use_init_array, UseInitArrayDefault))
116 CC1Args.push_back(
"-fno-use-init-array");
120 ArgStringList &CC1Args)
const {
121 if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc) ||
122 DriverArgs.hasArg(options::OPT_nostdlibinc) ||
123 DriverArgs.hasArg(options::OPT_nostdincxx))
125 if (
const char *cl_include_dir = getenv(
"NCC_CPLUS_INCLUDE_PATH")) {
127 const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator,
'\0'};
128 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
140 ArgStringList &CmdArgs)
const {
142 "Only -lc++ (aka libxx) is supported in this toolchain.");
148 CmdArgs.push_back(
"-rpath");
149 CmdArgs.push_back(Args.MakeArgString(*
Path));
152 CmdArgs.push_back(
"-lc++");
153 if (Args.hasArg(options::OPT_fexperimental_library))
154 CmdArgs.push_back(
"-lc++experimental");
155 CmdArgs.push_back(
"-lc++abi");
156 CmdArgs.push_back(
"-lunwind");
158 CmdArgs.push_back(
"-lpthread");
160 CmdArgs.push_back(
"-ldl");
163llvm::ExceptionHandling
166 return llvm::ExceptionHandling::SjLj;
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.