From d5f7d19dc8437d186788573ac9f24edf36455b71 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 25 Jul 2016 04:47:44 +0000 Subject: [PATCH] [MSVCToolChain] Guard hardcoded Windows paths with LLVM_ON_WIN32 Paths like C:/foo will never work on UNIX platforms, don't bother implicitly adding them to the search path. llvm-svn: 276606 --- clang/lib/Driver/MSVCToolChain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Driver/MSVCToolChain.cpp b/clang/lib/Driver/MSVCToolChain.cpp index fc2128f..62a2ea6a 100644 --- a/clang/lib/Driver/MSVCToolChain.cpp +++ b/clang/lib/Driver/MSVCToolChain.cpp @@ -648,6 +648,7 @@ void MSVCToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs, return; } +#if defined(LLVM_ON_WIN32) // As a fallback, select default install paths. // FIXME: Don't guess drives and paths like this on Windows. const StringRef Paths[] = { @@ -658,6 +659,7 @@ void MSVCToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs, "C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include" }; addSystemIncludes(DriverArgs, CC1Args, Paths); +#endif } void MSVCToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, -- 2.7.4