diff options
author | Justin Lebar <jlebar@google.com> | 2016-12-15 18:44:57 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-12-15 18:44:57 +0000 |
commit | 3cf25461e05dcbbb3ef5d2df1e0cbdeb46c31f47 (patch) | |
tree | 679fd04c636a4ce2952c2e81a8d225186c879528 /clang/lib/Driver/Tools.cpp | |
parent | a97358bc8e8c9a98438d0bae0f863cf8b16c8e2b (diff) | |
download | bcm5719-llvm-3cf25461e05dcbbb3ef5d2df1e0cbdeb46c31f47.tar.gz bcm5719-llvm-3cf25461e05dcbbb3ef5d2df1e0cbdeb46c31f47.zip |
[CUDA] Add --ptxas-path= flag.
Summary:
This lets you build with one CUDA installation but use ptxas from
another install.
This is useful e.g. if you want to avoid bugs in an old ptxas without
actually upgrading wholesale to a newer CUDA version.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27788
llvm-svn: 289847
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index dbe8cfb340f..253a25695fe 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -12105,7 +12105,11 @@ void NVPTX::Assembler::ConstructJob(Compilation &C, const JobAction &JA, for (const auto& A : Args.getAllArgValues(options::OPT_Xcuda_ptxas)) CmdArgs.push_back(Args.MakeArgString(A)); - const char *Exec = Args.MakeArgString(TC.GetProgramPath("ptxas")); + const char *Exec; + if (Arg *A = Args.getLastArg(options::OPT_ptxas_path_EQ)) + Exec = A->getValue(); + else + Exec = Args.MakeArgString(TC.GetProgramPath("ptxas")); C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs)); } |