summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/WindowsToolChain.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-22 04:31:15 +0000
committerAlp Toker <alp@nuanti.com>2014-06-22 04:31:15 +0000
commitf1ffc84f10bc0d99ae34e38b9fb8a3ceebf9a748 (patch)
treea5882fa5f09a9d2d31e5adaf33c09f0dc206c9ed /clang/lib/Driver/WindowsToolChain.cpp
parentc11107cb1e1c102af335f8c396bc6c327dc5094b (diff)
downloadbcm5719-llvm-f1ffc84f10bc0d99ae34e38b9fb8a3ceebf9a748.tar.gz
bcm5719-llvm-f1ffc84f10bc0d99ae34e38b9fb8a3ceebf9a748.zip
Enable WindowsToolChain on all native Windows builds
Make binaries built by MSVC, mingw and clang functionally equivalent. The checks are trivially performed at runtime to eliminate functional differences between supported configurations that used to be hard-coded. llvm-svn: 211461
Diffstat (limited to 'clang/lib/Driver/WindowsToolChain.cpp')
-rw-r--r--clang/lib/Driver/WindowsToolChain.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Driver/WindowsToolChain.cpp b/clang/lib/Driver/WindowsToolChain.cpp
index 3f334d3132f..de31e856491 100644
--- a/clang/lib/Driver/WindowsToolChain.cpp
+++ b/clang/lib/Driver/WindowsToolChain.cpp
@@ -14,6 +14,7 @@
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
+#include "llvm/Config/llvm-config.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/ErrorHandling.h"
@@ -21,8 +22,7 @@
// Include the necessary headers to interface with the Windows registry and
// environment.
-// TODO: Investigate enabling this with __MINGW32__.
-#if defined(_MSC_VER)
+#if defined(LLVM_ON_WIN32)
#define USE_WIN32
#endif
@@ -283,11 +283,6 @@ void Windows::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
if (DriverArgs.hasArg(options::OPT_nostdlibinc))
return;
-// TODO: This code path is portable. Conditionalize on LLVM_ON_WIN32 instead?
-#ifndef USE_WIN32
- return;
-#endif
-
// Honor %INCLUDE%. It should know essential search paths with vcvarsall.bat.
if (const char *cl_include_dir = getenv("INCLUDE")) {
SmallVector<StringRef, 8> Dirs;
OpenPOWER on IntegriCloud