From 59b8afe50274be975c62a4b11db49c84a874c0c0 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Thu, 27 May 2021 16:38:09 -0700 Subject: [PATCH] [clang-cl] Bump default -fms-compatibility-version to 19.14 MSVC required version is 19.14 now (https://reviews.llvm.org/D92515). Update the default -fms-compatibility-version to 19.14. Differential Revision: https://reviews.llvm.org/D103293 --- clang/docs/ReleaseNotes.rst | 4 +++- clang/lib/Driver/ToolChains/MSVC.cpp | 4 ++-- clang/test/Driver/cl-options.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index f3f7fb4..81609fa 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -62,7 +62,9 @@ Improvements to Clang's diagnostics Non-comprehensive list of changes in this release ------------------------------------------------- -- ... +- The default value of _MSC_VER was raised from 1911 to 1914. MSVC 19.14 has the + support to overaligned objects on x86_32 which is required for some LLVM + passes. New Compiler Flags ------------------ diff --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp index 2fddbd6..80fea1f 100644 --- a/clang/lib/Driver/ToolChains/MSVC.cpp +++ b/clang/lib/Driver/ToolChains/MSVC.cpp @@ -1337,8 +1337,8 @@ VersionTuple MSVCToolChain::computeMSVCVersion(const Driver *D, if (MSVT.empty() && Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions, IsWindowsMSVC)) { - // -fms-compatibility-version=19.11 is default, aka 2017, 15.3 - MSVT = VersionTuple(19, 11); + // -fms-compatibility-version=19.14 is default, aka 2017, 15.7 + MSVT = VersionTuple(19, 14); } return MSVT; } diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index da0f073..a912523 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -724,7 +724,7 @@ // Validate that the default triple is used when run an empty tools dir is specified // RUN: %clang_cl -vctoolsdir "" -### -- %s 2>&1 | FileCheck %s --check-prefix VCTOOLSDIR -// VCTOOLSDIR: "-triple" "{{[a-zA-Z0-9_-]*}}-pc-windows-msvc19.11.0" +// VCTOOLSDIR: "-triple" "{{[a-zA-Z0-9_-]*}}-pc-windows-msvc19.14.0" // Validate that built-in include paths are based on the supplied path // RUN: %clang_cl --target=aarch64-pc-windows-msvc -vctoolsdir "/fake" -winsdkdir "/foo" -winsdkversion 10.0.12345.0 -### -- %s 2>&1 | FileCheck %s --check-prefix FAKEDIR -- 2.7.4