[CUDA,clang-cl] Filter out unsupported arguments for device-side compilation.
authorArtem Belevich <tra@google.com>
Thu, 27 Feb 2020 23:35:19 +0000 (15:35 -0800)
committerArtem Belevich <tra@google.com>
Wed, 11 Mar 2020 20:42:16 +0000 (13:42 -0700)
commit0c06a389e5937895579effd5e608c79bc6332e53
treeb46e172b85e445bd5299d441cc0424a1e2bf11d9
parentc915cb957dc37275ce1ca1a0b993239c82f12692
[CUDA,clang-cl] Filter out unsupported arguments for device-side compilation.

Device-side compilation does not support some features and we need to
filter them out when command line options enable them for the host.

We're already doing this in various places in the regular clang driver,
but clang-cl mode constructs cc1 options independently and needs to
implement the filtering, too.

Differential Revision: https://reviews.llvm.org/D75310
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/cl-options.cu [new file with mode: 0644]