]> granicus.if.org Git - clang/commit
Revert r369402 "win: Enable /Zc:twoPhase by default if targeting MSVC 2017 update...
authorHans Wennborg <hans@hanshq.net>
Thu, 22 Aug 2019 13:15:36 +0000 (13:15 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 22 Aug 2019 13:15:36 +0000 (13:15 +0000)
commitacfb9c8dbb68e01b51fadf9eeec9421cb309a319
tree95d94401190dd4069684194b8f034972ee5a37bc
parent58006f8790298e1c1ea5040b77dc30b9c2beb58d
Revert r369402 "win: Enable /Zc:twoPhase by default if targeting MSVC 2017 update 3 or newer"

This broke compiling some ASan tests with never versions of MSVC/the Win
SDK, see https://crbug.com/996675

> MSVC 2017 update 3 (_MSC_VER 1911) enables /Zc:twoPhase by default, and
> so should clang-cl:
> https://docs.microsoft.com/en-us/cpp/build/reference/zc-twophase
>
> clang-cl takes the MSVC version it emulates from the -fmsc-version flag,
> or if that's not passed it tries to check what the installed version of
> MSVC is and uses that, and failing that it uses a default version that's
> currently 1911. So this changes the default if no -fmsc-version flag is
> passed and no installed MSVC is detected. (It also changes the default
> if -fmsc-version is passed or MSVC is detected, and either indicates
> _MSC_VER >= 1911.)
>
> As mentioned in the MSDN article, the Windows SDK header files in
> version 10.0.15063.0 (Creators Update or Redstone 2) and earlier
> versions do not work correctly with /Zc:twoPhase. If you need to use
> these old SDKs with a new clang-cl, explicitly pass /Zc:twoPhase- to get
> the old behavior.
>
> Fixes PR43032.
>
> Differential Revision: https://reviews.llvm.org/D66394

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369647 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ReleaseNotes.rst
include/clang/Driver/CLCompatOptions.td
lib/Driver/ToolChains/Clang.cpp
test/Driver/cl-options.c