Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Driver/ToolChains/Flang.cpp
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | Args.AddAllArgs(CmdArgs, | ||||
options::OPT_fintrinsic_modules_path, options::OPT_pedantic, | options::OPT_fintrinsic_modules_path, options::OPT_pedantic, | ||||
options::OPT_std_EQ, options::OPT_W_Joined}); | options::OPT_std_EQ, options::OPT_W_Joined}); | ||||
} | } | ||||
void Flang::ConstructJob(Compilation &C, const JobAction &JA, | void Flang::ConstructJob(Compilation &C, const JobAction &JA, | ||||
const InputInfo &Output, const InputInfoList &Inputs, | const InputInfo &Output, const InputInfoList &Inputs, | ||||
const ArgList &Args, const char *LinkingOutput) const { | const ArgList &Args, const char *LinkingOutput) const { | ||||
const auto &TC = getToolChain(); | const auto &TC = getToolChain(); | ||||
// TODO: Once code-generation is available, this will need to be commented | const llvm::Triple &Triple = TC.getEffectiveTriple(); | ||||
// out. | const std::string &TripleStr = Triple.getTriple(); | ||||
// const llvm::Triple &Triple = TC.getEffectiveTriple(); | |||||
// const std::string &TripleStr = Triple.getTriple(); | |||||
ArgStringList CmdArgs; | ArgStringList CmdArgs; | ||||
// Invoke ourselves in -fc1 mode. | // Invoke ourselves in -fc1 mode. | ||||
CmdArgs.push_back("-fc1"); | CmdArgs.push_back("-fc1"); | ||||
// TODO: Once code-generation is available, this will need to be commented | |||||
// out. | |||||
// Add the "effective" target triple. | // Add the "effective" target triple. | ||||
// CmdArgs.push_back("-triple"); | CmdArgs.push_back("-triple"); | ||||
// CmdArgs.push_back(Args.MakeArgString(TripleStr)); | CmdArgs.push_back(Args.MakeArgString(TripleStr)); | ||||
if (isa<PreprocessJobAction>(JA)) { | if (isa<PreprocessJobAction>(JA)) { | ||||
CmdArgs.push_back("-E"); | CmdArgs.push_back("-E"); | ||||
} else if (isa<CompileJobAction>(JA) || isa<BackendJobAction>(JA)) { | } else if (isa<CompileJobAction>(JA) || isa<BackendJobAction>(JA)) { | ||||
if (JA.getType() == types::TY_Nothing) { | if (JA.getType() == types::TY_Nothing) { | ||||
CmdArgs.push_back("-fsyntax-only"); | CmdArgs.push_back("-fsyntax-only"); | ||||
} else if (JA.getType() == types::TY_AST) { | } else if (JA.getType() == types::TY_AST) { | ||||
CmdArgs.push_back("-emit-ast"); | CmdArgs.push_back("-emit-ast"); | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |