diff options
-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) |