]> granicus.if.org Git - clang/commit
[CUDA] Don't initialize the CUDA toolchain if we don't have any CUDA inputs.
authorJustin Lebar <jlebar@google.com>
Wed, 30 Mar 2016 23:30:25 +0000 (23:30 +0000)
committerJustin Lebar <jlebar@google.com>
Wed, 30 Mar 2016 23:30:25 +0000 (23:30 +0000)
commit8f2ebd036729227977ba262556832ca99777c474
treea2b35f25cda9583e815a63e1b8a6ec4b4a056c4d
parentfb35fc36e6e57748802fe2d18bd962daaa5bbaa1
[CUDA] Don't initialize the CUDA toolchain if we don't have any CUDA inputs.

Summary:
This prevents errors when you invoke clang with a flag that the NVPTX
toolchain doesn't support.  For example, on x86-64,

  clang -mthread-model single -x c++ /dev/null -o /dev/null

should output just one error about "invalid thread model 'single' in
'-mthread-model single' for this target"; x86-64 doesn't support
-mthread-model, but we shouldn't also instantiate a NVPTX target!

Reviewers: echristo

Subscribers: tra, sunfish, cfe-commits

Differential Revision: http://reviews.llvm.org/D18629

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264965 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Driver.cpp