13#include "llvm/Option/ArgList.h"
14#include "llvm/Support/Path.h"
25 :
Linux(D, Triple, Args) {
79 ArgStringList &CC1Args)
const {
80 if (DriverArgs.hasArg(options::OPT_nostdinc))
83 if (DriverArgs.hasArg(options::OPT_nobuiltininc) &&
84 DriverArgs.hasArg(options::OPT_nostdlibinc))
87 if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
89 llvm::sys::path::append(P,
"include");
93 if (!DriverArgs.hasArg(options::OPT_nostdlibinc)) {
94 if (
const char *cl_include_dir = getenv(
"NCC_C_INCLUDE_PATH")) {
96 const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator,
'\0'};
97 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
102 getDriver().SysRoot +
"/opt/nec/ve/include");
110 CC1Args.push_back(
"-nostdsysteminc");
111 bool UseInitArrayDefault =
true;
112 if (!DriverArgs.hasFlag(options::OPT_fuse_init_array,
113 options::OPT_fno_use_init_array, UseInitArrayDefault))
114 CC1Args.push_back(
"-fno-use-init-array");
118 ArgStringList &CC1Args)
const {
119 if (DriverArgs.hasArg(options::OPT_nostdinc) ||
120 DriverArgs.hasArg(options::OPT_nostdlibinc) ||
121 DriverArgs.hasArg(options::OPT_nostdincxx))
123 if (
const char *cl_include_dir = getenv(
"NCC_CPLUS_INCLUDE_PATH")) {
125 const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator,
'\0'};
126 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
138 ArgStringList &CmdArgs)
const {
140 "Only -lc++ (aka libxx) is supported in this toolchain.");
144 CmdArgs.push_back(
"-rpath");
145 CmdArgs.push_back(Args.MakeArgString(*Path));
148 CmdArgs.push_back(
"-lc++");
149 if (Args.hasArg(options::OPT_fexperimental_library))
150 CmdArgs.push_back(
"-lc++experimental");
151 CmdArgs.push_back(
"-lc++abi");
152 CmdArgs.push_back(
"-lunwind");
154 CmdArgs.push_back(
"-lpthread");
156 CmdArgs.push_back(
"-ldl");
159llvm::ExceptionHandling
162 return llvm::ExceptionHandling::SjLj;
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Top level wrappers for InstallAPI frontend operations.
Represents a bound architecture for offload / multiple architecture compilation.