diff options
author | Tanya Lattner <tonic@nondot.org> | 2011-11-17 07:40:32 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2011-11-17 07:40:32 +0000 |
commit | bc12345cbebd4137c25b3955fd08006c485fe04e (patch) | |
tree | 6fed9916c82d8bd45abecb68462ebb6cdbac9942 | |
parent | 1b871840be436b0099be0ece01b3dd2701d18e35 (diff) | |
download | llvm-bc12345cbebd4137c25b3955fd08006c485fe04e.zip llvm-bc12345cbebd4137c25b3955fd08006c485fe04e.tar.gz llvm-bc12345cbebd4137c25b3955fd08006c485fe04e.tar.bz2 |
Merge r143770 from mainline to fix MSVC build.llvmorg-3.0.0-rc4llvmorg-3.0.0
llvm-svn: 144894
-rw-r--r-- | clang/lib/Driver/CMakeLists.txt | 8 | ||||
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt index ee7ded9..ac63a2d 100644 --- a/clang/lib/Driver/CMakeLists.txt +++ b/clang/lib/Driver/CMakeLists.txt @@ -21,5 +21,13 @@ add_clang_library(clangDriver Types.cpp ) +IF(MSVC) + get_target_property(NON_ANSI_COMPILE_FLAGS clangDriver COMPILE_FLAGS) + string(REPLACE /Za + "" NON_ANSI_COMPILE_FLAGS + ${NON_ANSI_COMPILE_FLAGS}) + set_target_properties(clangDriver PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS}) +ENDIF(MSVC) + add_dependencies(clangDriver ClangAttrList ClangDiagnosticDriver ClangDriverOptions ClangCC1Options ClangCC1AsOptions) diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 4014926..eb730e5 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -44,7 +44,9 @@ // environment. #ifdef _MSC_VER #define WIN32_LEAN_AND_MEAN 1 - #include <windows.h> + #include <Windows.h> + #undef min + #undef max #endif using namespace clang::driver; @@ -2334,7 +2336,7 @@ static bool getVisualStudioDir(std::string &path) { path = vsIDEInstallDir; return true; } - + if (hasVCExpressDir && vsExpressIDEInstallDir[0]) { char *p = (char*)strstr(vsExpressIDEInstallDir, "\\Common7\\IDE"); if (p) |