diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-07-13 22:26:30 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-07-13 22:26:30 +0000 |
commit | abbd6d6824eb3faee53254a5d165e6d42e3540ca (patch) | |
tree | e1e779b3dfe06feb590e163e5d3dc56441fd088a /clang/lib/Driver/Tools.cpp | |
parent | 3ca8f429b1a66daffddd77fd15baf048beff363c (diff) | |
download | bcm5719-llvm-abbd6d6824eb3faee53254a5d165e6d42e3540ca.tar.gz bcm5719-llvm-abbd6d6824eb3faee53254a5d165e6d42e3540ca.zip |
This reverts commit r242058, r242065, r242067.
The tests were failing on OS X.
Revert "[cuda] Driver changes to compile and stitch together host and device-side CUDA code."
Revert "Fixed regex to properly match '64' in the test case."
Revert "clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least."
llvm-svn: 242077
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 0757355958a..180533396c1 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1488,12 +1488,6 @@ static std::string getCPUName(const ArgList &Args, const llvm::Triple &T) { return CPUName; } - case llvm::Triple::nvptx: - case llvm::Triple::nvptx64: - if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) - return A->getValue(); - return ""; - case llvm::Triple::ppc: case llvm::Triple::ppc64: case llvm::Triple::ppc64le: { @@ -2832,14 +2826,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, getToolChain().getTriple().isWindowsCygwinEnvironment(); bool IsWindowsMSVC = getToolChain().getTriple().isWindowsMSVCEnvironment(); - // Check number of inputs for sanity. We need at least one input. - assert(Inputs.size() >= 1 && "Must have at least one input."); + assert(Inputs.size() == 1 && "Unable to handle multiple inputs."); const InputInfo &Input = Inputs[0]; - // CUDA compilation may have multiple inputs (source file + results of - // device-side compilations). All other jobs are expected to have exactly one - // input. - bool IsCuda = types::isCuda(Input.getType()); - assert((IsCuda || Inputs.size() == 1) && "Unable to handle multiple inputs."); // Invoke ourselves in -cc1 mode. // @@ -4814,12 +4802,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, assert(Output.isNothing() && "Invalid output."); } - addDashXForInput(Args, Input, CmdArgs); + for (const auto &II : Inputs) { + addDashXForInput(Args, II, CmdArgs); - if (Input.isFilename()) - CmdArgs.push_back(Input.getFilename()); - else - Input.getInputArg().renderAsInput(Args, CmdArgs); + if (II.isFilename()) + CmdArgs.push_back(II.getFilename()); + else + II.getInputArg().renderAsInput(Args, CmdArgs); + } Args.AddAllArgs(CmdArgs, options::OPT_undef); @@ -4857,16 +4847,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(SplitDwarfOut); } - // Host-side cuda compilation receives device-side outputs as Inputs[1...]. - // Include them with -fcuda-include-gpubinary. - if (IsCuda && Inputs.size() > 1) - for (InputInfoList::const_iterator it = std::next(Inputs.begin()), - ie = Inputs.end(); - it != ie; ++it) { - CmdArgs.push_back("-fcuda-include-gpubinary"); - CmdArgs.push_back(it->getFilename()); - } - // Finally add the compile command to the compilation. if (Args.hasArg(options::OPT__SLASH_fallback) && Output.getType() == types::TY_Object && |