diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-08-22 13:15:36 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-08-22 13:15:36 +0000 |
commit | 8288453f6aac05080b751b680455349e09d49825 (patch) | |
tree | 255701fd79a51c22178f15ac068526edbd860bb8 /clang/test/Driver/cl-options.c | |
parent | 5215770e88ee71321466a4904a4ab628af687673 (diff) | |
download | bcm5719-llvm-8288453f6aac05080b751b680455349e09d49825.tar.gz bcm5719-llvm-8288453f6aac05080b751b680455349e09d49825.zip |
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
llvm-svn: 369647
Diffstat (limited to 'clang/test/Driver/cl-options.c')
-rw-r--r-- | clang/test/Driver/cl-options.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index cb3be9ad7ea..68f08b0c18c 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -316,19 +316,13 @@ // We recognize -f[no-]delayed-template-parsing. // /Zc:twoPhase[-] has the opposite meaning. -// RUN: %clang_cl -c -fmsc-version=1910 -### -- %s 2>&1 | FileCheck -check-prefix=OLDDELAYEDDEFAULT %s -// OLDDELAYEDDEFAULT: "-fdelayed-template-parsing" -// RUN: %clang_cl -fmsc-version=1911 -c -### -- %s 2>&1 | FileCheck -check-prefix=NEWDELAYEDDEFAULT %s -// NEWDELAYEDDEFAULT-NOT: "-fdelayed-template-parsing" -// RUN: %clang_cl -c -fmsc-version=1910 -fdelayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDON %s -// RUN: %clang_cl -c -fmsc-version=1911 -fdelayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDON %s -// RUN: %clang_cl -c -fmsc-version=1910 /Zc:twoPhase- -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDON %s -// RUN: %clang_cl -c -fmsc-version=1911 /Zc:twoPhase- -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDON %s +// RUN: %clang_cl -c -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDDEFAULT %s +// DELAYEDDEFAULT: "-fdelayed-template-parsing" +// RUN: %clang_cl -c -fdelayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDON %s +// RUN: %clang_cl -c /Zc:twoPhase- -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDON %s // DELAYEDON: "-fdelayed-template-parsing" -// RUN: %clang_cl -c -fmsc-version=1910 -fno-delayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDOFF %s -// RUN: %clang_cl -c -fmsc-version=1911 -fno-delayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDOFF %s -// RUN: %clang_cl -c -fmsc-version=1910 /Zc:twoPhase -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDOFF %s -// RUN: %clang_cl -c -fmsc-version=1911 /Zc:twoPhase -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDOFF %s +// RUN: %clang_cl -c -fno-delayed-template-parsing -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDOFF %s +// RUN: %clang_cl -c /Zc:twoPhase -### -- %s 2>&1 | FileCheck -check-prefix=DELAYEDOFF %s // DELAYEDOFF-NOT: "-fdelayed-template-parsing" // RUN: %clang_cl -c -### /std:c++latest -- %s 2>&1 | FileCheck -check-prefix CHECK-LATEST-CHAR8_T %s |