When clang is running on windows, /dev/null is not available. Use nul as empty input file instead.
Differential Revision: https://reviews.llvm.org/D56225
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350885
91177308-0d34-0410-b5e6-
96231b3b80d8
using namespace clang;
using namespace llvm::opt;
+#if _WIN32 || _WIN64
+#define NULL_FILE "nul"
+#else
+#define NULL_FILE "/dev/null"
+#endif
+
namespace {
static void addBCLib(Compilation &C, const ArgList &Args,
// ToDo: Remove the dummy host binary entry which is required by
// clang-offload-bundler.
std::string BundlerTargetArg = "-targets=host-x86_64-unknown-linux";
- std::string BundlerInputArg = "-inputs=/dev/null";
+ std::string BundlerInputArg = "-inputs=" NULL_FILE;
for (const auto &II : Inputs) {
const auto* A = II.getAction();