diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-08-20 16:28:11 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-08-20 16:28:11 +0000 |
commit | 8e55d9ccb026f6ed09396161e87d29fc49a9750d (patch) | |
tree | e4395159fba94adbd1830153d1e2940da61f0cd8 /include | |
parent | e39526655ee2cfa8a6e4a3ef538049a1aa076532 (diff) | |
download | clang-8e55d9ccb026f6ed09396161e87d29fc49a9750d.tar.gz |
win: Enable /Zc:twoPhase by default if targeting MSVC 2017 update 3 or newer
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@369402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Driver/CLCompatOptions.td | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index bb51c3aa11..bf5addb854 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -235,10 +235,10 @@ def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">, def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">, HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>; def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">, - HelpText<"Enable two-phase name lookup in templates">, + HelpText<"Enable two-phase name lookup in templates (default)">, Alias<fno_delayed_template_parsing>; def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">, - HelpText<"Disable two-phase name lookup in templates (default)">, + HelpText<"Disable two-phase name lookup in templates">, Alias<fdelayed_template_parsing>; def _SLASH_Z7 : CLFlag<"Z7">, HelpText<"Enable CodeView debug information in object files">; |