From 77bd18467c221dd6b841ebc78fe75d62072e842c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 11:54:55 -0700 Subject: [PATCH 01/13] provision-image.ps1: Windows 11 SDK 22621. --- azure-devops/provision-image.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index dfc75d8f4a0..6c8d0e9a653 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -132,7 +132,7 @@ $Workloads = @( 'Microsoft.VisualStudio.Component.VC.Tools.ARM64', 'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', - 'Microsoft.VisualStudio.Component.Windows11SDK.22000' + 'Microsoft.VisualStudio.Component.Windows11SDK.22621' ) $VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe' From 866fa8b4d686e73aeaa503cc6c71409e3e6cf361 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 11:56:08 -0700 Subject: [PATCH 02/13] provision-image.ps1: CUDA 12.4.0. --- azure-devops/provision-image.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index 6c8d0e9a653..2ed79dac5e2 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -138,7 +138,7 @@ $Workloads = @( $VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe' $PythonUrl = 'https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe' -$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_511.23_windows.exe' +$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe' $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' From 0011322a051aeda607d1ec45527f3af90a1bdf4a Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 11:57:06 -0700 Subject: [PATCH 03/13] provision-image.ps1: Drop AV exclusions. See MSVC-PR-533609. --- azure-devops/provision-image.ps1 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index 2ed79dac5e2..e68adf909cb 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -302,15 +302,6 @@ Write-Host 'AdminUser password not supplied; assuming already running as AdminUs # Print the Windows version, so we can verify whether Patch Tuesday has been picked up. cmd /c ver -Write-Host 'Configuring AntiVirus exclusions...' -Add-MpPreference -ExclusionPath C:\agent -Add-MpPreference -ExclusionPath D:\ -Add-MpPreference -ExclusionProcess ninja.exe -Add-MpPreference -ExclusionProcess clang-cl.exe -Add-MpPreference -ExclusionProcess cl.exe -Add-MpPreference -ExclusionProcess link.exe -Add-MpPreference -ExclusionProcess python.exe - InstallPython $PythonUrl InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl InstallCuda -Url $CudaUrl From 8411333d942b6814d20ad0b3e868ba149b8ed6b7 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 12:45:21 -0700 Subject: [PATCH 04/13] New pool. --- azure-devops/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/config.yml b/azure-devops/config.yml index 4379f1f493d..33caf0b137a 100644 --- a/azure-devops/config.yml +++ b/azure-devops/config.yml @@ -5,7 +5,7 @@ variables: - name: poolName - value: 'StlBuild-2024-02-13T1246-Pool' + value: 'StlBuild-2024-03-12T1202-Pool' readonly: true - name: poolDemands value: 'EnableSpotVM -equals true' From da55a935cb61b2d7a85fe72429c262998e15142f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 12:46:23 -0700 Subject: [PATCH 05/13] README.md: VS 2022 17.10 Preview 2. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b4be35e58d2..48e6ca8b073 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With The Visual Studio IDE -1. Install Visual Studio 2022 17.10 Preview 1 or later. +1. Install Visual Studio 2022 17.10 Preview 2 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. @@ -156,7 +156,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With A Native Tools Command Prompt -1. Install Visual Studio 2022 17.10 Preview 1 or later. +1. Install Visual Studio 2022 17.10 Preview 2 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. From 4773cdcdf7edca4810dbbcfa59dc104c48c26f02 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 12:50:13 -0700 Subject: [PATCH 06/13] README.md: Windows 11 SDK (10.0.22621.0) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48e6ca8b073..351d7588a17 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With The Visual Studio IDE 1. Install Visual Studio 2022 17.10 Preview 2 or later. - * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. + * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.28.0 or later, and [Ninja][] 1.11.0 or later. @@ -157,7 +157,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With A Native Tools Command Prompt 1. Install Visual Studio 2022 17.10 Preview 2 or later. - * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. + * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.28.0 or later, and [Ninja][] 1.11.0 or later. From 7818e0ab2deb2ceab7338ecf655d4e8acd1e9a61 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 13:02:04 -0700 Subject: [PATCH 07/13] CMakeLists.txt: Require WinSDK 22621. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d27077e63db..62040d06a6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,12 +9,12 @@ project(msvc_standard_libraries LANGUAGES CXX) include(CheckCXXSourceCompiles) check_cxx_source_compiles([=[ #include -static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN10_CO, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version."); +static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN10_NI, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version."); int main() {} ]=] WINDOWS_SDK_VERSION_CHECK) if(NOT WINDOWS_SDK_VERSION_CHECK) - message(FATAL_ERROR "The STL must be built with the Windows 11 SDK (10.0.22000.0) or later. Make sure it's available by selecting it in the Individual Components tab of the VS Installer.") + message(FATAL_ERROR "The STL must be built with the Windows 11 SDK (10.0.22621.0) or later. Make sure it's available by selecting it in the Individual Components tab of the VS Installer.") endif() if(NOT DEFINED VCLIBS_TARGET_ARCHITECTURE) From e9fd8465e15a57e1f67dcce07edbde9143b2dc49 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 13:03:35 -0700 Subject: [PATCH 08/13] CMakeLists.txt: Define NTDDI_VERSION=NTDDI_WIN10_NI to make the latest machinery available. NON-GitHub change required: src/vctools/crt/crt-common.settings.targets --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62040d06a6c..963a12dd08b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,7 @@ set(STL_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR set(STL_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/bin/${VCLIBS_I386_OR_AMD64}") add_compile_definitions( _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH WIN32_LEAN_AND_MEAN STRICT _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS - _WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN10_CO) + _WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN10_NI) if(STL_USE_ANALYZE) # TRANSITION OS-40109504: Windows SDK: incorrect SAL annotations on functions the STL uses From daa7f5810a51c0ac1276a302f872ed661ed85d85 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 13:10:48 -0700 Subject: [PATCH 09/13] CMakeLists.txt: WinSDK 22621 still emits warning C6553. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 963a12dd08b..5eb09a74e84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,7 @@ if(STL_USE_ANALYZE) # does not apply to a value type. # There's a bug in the declaration for LCMapStringEx - it applies _In_opt_ to an LPARAM. # LPARAM is a LONG_PTR (intptr_t), and it's invalid to apply _In_opt_ to a non-pointer. - # As of the Windows 11 SDK (10.0.22000.0), there are 5 total occurrences of warning C6553 affecting the STL's build. + # As of the Windows 11 SDK (10.0.22621.0), there are 5 total occurrences of warning C6553 affecting the STL's build. add_compile_options("$<$:/analyze:autolog-;/wd6553>") endif() From aaab75d0710f17f9ac463bdf286072192d3e1fe6 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 13:15:37 -0700 Subject: [PATCH 10/13] Require CUDA 12.4, remove `--allow-unsupported-compiler`. --- stl/inc/yvals_core.h | 4 ++-- tests/std/tests/GH_000639_nvcc_include_all/env.lst | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index deeea42df22..0b6404cb014 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -888,8 +888,8 @@ #ifndef _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH #if defined(__CUDACC__) && defined(__CUDACC_VER_MAJOR__) -#if __CUDACC_VER_MAJOR__ < 11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ < 6) -_EMIT_STL_ERROR(STL1002, "Unexpected compiler version, expected CUDA 11.6 or newer."); +#if __CUDACC_VER_MAJOR__ < 12 || (__CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ < 4) +_EMIT_STL_ERROR(STL1002, "Unexpected compiler version, expected CUDA 12.4 or newer."); #endif // ^^^ old CUDA ^^^ #elif defined(__EDG__) // not attempting to detect __EDG_VERSION__ being less than expected diff --git a/tests/std/tests/GH_000639_nvcc_include_all/env.lst b/tests/std/tests/GH_000639_nvcc_include_all/env.lst index 38d8f4c1267..633ab107731 100644 --- a/tests/std/tests/GH_000639_nvcc_include_all/env.lst +++ b/tests/std/tests/GH_000639_nvcc_include_all/env.lst @@ -1,8 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# TRANSITION, CUDA 11.6 rejected VS 2022 17.10 as unsupported, so we need --allow-unsupported-compiler -PM_COMPILER="nvcc" PM_CL="--x cu -Xcompiler -Od,-EHsc,-nologo,-W4,-WX,-openmp --allow-unsupported-compiler" +PM_COMPILER="nvcc" PM_CL="--x cu -Xcompiler -Od,-EHsc,-nologo,-W4,-WX,-openmp" RUNALL_CROSSLIST PM_CL="-Xcompiler -MT" PM_CL="--debug -Xcompiler -MTd" From 35af734fc61809791ea22f304a3d18e2eeae7956 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 13:42:47 -0700 Subject: [PATCH 11/13] Remove workaround for VSO-1888157 "[EDG] failure to compare past-the-end pointer with nullptr in constexpr", fixed 2023-10-30. --- tests/std/tests/VSO_0000000_allocator_propagation/test.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp index c0e775c77f0..7248b7cd359 100644 --- a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp +++ b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp @@ -69,11 +69,7 @@ class nontrivial_pointer : private test_leak { _CONSTEXPR20 ~nontrivial_pointer() = default; _CONSTEXPR20 explicit operator bool() const noexcept { -#ifdef __EDG__ // TRANSITION, VSO-1888157 - return static_cast(ptr); -#else // ^^^ workaround / no workaround vvv return ptr != nullptr; -#endif // ^^^ no workaround ^^^ } _CONSTEXPR20 add_lvalue_reference_t operator*() const noexcept { return *ptr; From 7b1e2702e57aa49f3941a3282545402dd019e0bd Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 13:45:18 -0700 Subject: [PATCH 12/13] Remove workaround for DevCom-10112408 VSO-1588505 "Implicit conversion to function parameter of a non-movable type is still broken", closed as fixed on 2023-11-06. --- tests/std/tests/P0088R3_variant/test.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/std/tests/P0088R3_variant/test.cpp b/tests/std/tests/P0088R3_variant/test.cpp index 3a45c474c20..838fc0f574a 100644 --- a/tests/std/tests/P0088R3_variant/test.cpp +++ b/tests/std/tests/P0088R3_variant/test.cpp @@ -7674,10 +7674,8 @@ namespace msvc { }; using VarTestConv = std::variant; -#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10112408 assert(std::visit(std::identity{}, VarTestConv{convertible_to_immobile_one{}}).x == 1729); assert(std::visit(std::identity{}, VarTestConv{convertible_to_immobile_other{}}).x == 1138); -#endif // TRANSITION, DevCom-10112408 auto immobile_converter = [](auto src) -> immobile_data { return src; }; assert(std::visit(immobile_converter, VarTestConv{convertible_to_immobile_one{}}).x == 1729); assert(std::visit(immobile_converter, VarTestConv{convertible_to_immobile_other{}}).x == 1138); From 2db4208651606b15dfeef0bf839027b6a962ebf2 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 12 Mar 2024 13:47:56 -0700 Subject: [PATCH 13/13] Remove workarounds for VSO-1538698 "Better handling for non-exported friend function declarations", fixed in 17.10p2. --- stl/inc/memory | 4 ++-- stl/inc/ostream | 2 +- stl/inc/tuple | 2 +- stl/inc/utility | 2 +- stl/inc/xhash | 2 +- stl/inc/xlocale | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stl/inc/memory b/stl/inc/memory index a70fc1f2084..b0f59f2fca6 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -2914,7 +2914,7 @@ struct _NODISCARD _Global_delete_guard { } }; -_EXPORT_STD /* TRANSITION, VSO-1538698 */ template +template _NODISCARD shared_ptr<_Ty> _Make_shared_unbounded_array(const size_t _Count, const _ArgTypes&... _Args) { // make a shared_ptr to an unbounded array static_assert(is_unbounded_array_v<_Ty>); @@ -3022,7 +3022,7 @@ struct _Allocate_n_ptr { _Allocate_n_ptr& operator=(const _Allocate_n_ptr&) = delete; }; -_EXPORT_STD /* TRANSITION, VSO-1538698 */ template +template _NODISCARD shared_ptr<_Ty> _Allocate_shared_unbounded_array( const _Alloc& _Al, const size_t _Count, const _ArgTypes&... _Args) { // make a shared_ptr to an unbounded array diff --git a/stl/inc/ostream b/stl/inc/ostream index 970cd37b731..3ce22b869be 100644 --- a/stl/inc/ostream +++ b/stl/inc/ostream @@ -1133,7 +1133,7 @@ void _Vprint_nonunicode_impl( _Ostr.setstate(_State); } -_EXPORT_STD /* TRANSITION, VSO-1538698 */ template +template ios_base::iostate _Print_noformat_unicode(ostream& _Ostr, const string_view _Str) { // *LOCKED* // diff --git a/stl/inc/tuple b/stl/inc/tuple index 89f442348d5..f5e120cf39f 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -954,7 +954,7 @@ _NODISCARD constexpr const tuple_element_t<_Index, tuple<_Types...>>&& get(const return static_cast(static_cast(_Tuple)._Myfirst._Val); } -_EXPORT_STD /* TRANSITION, VSO-1538698 */ template +template _NODISCARD constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept { // used by pair's piecewise constructor using _Ty = tuple_element_t<_Index, tuple<_Types...>>; diff --git a/stl/inc/utility b/stl/inc/utility index ea7f440dbf4..3206659c1be 100644 --- a/stl/inc/utility +++ b/stl/inc/utility @@ -155,7 +155,7 @@ struct tuple_element; _EXPORT_STD template using tuple_element_t = typename tuple_element<_Index, _Tuple>::type; -_EXPORT_STD /* TRANSITION, VSO-1538698 */ template +template _NODISCARD constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept; _EXPORT_STD template diff --git a/stl/inc/xhash b/stl/inc/xhash index 29a5b8c9f07..59c1c1e95e3 100644 --- a/stl/inc/xhash +++ b/stl/inc/xhash @@ -2002,7 +2002,7 @@ template using _Is_hasher = negation, _Is_allocator<_Hasher>>>; #endif // _HAS_CXX17 -_EXPORT_STD /* TRANSITION, VSO-1538698 */ template +template _NODISCARD bool _Hash_equal(const _Hash<_Traits>& _Left, const _Hash<_Traits>& _Right) { if (_Left.size() != _Right.size()) { return false; diff --git a/stl/inc/xlocale b/stl/inc/xlocale index d7c38253668..6a2f168ab72 100644 --- a/stl/inc/xlocale +++ b/stl/inc/xlocale @@ -800,7 +800,7 @@ __PURE_APPDOMAIN_GLOBAL locale::id codecvt<_Elem, _Byte, _Statype>::id; #pragma clang diagnostic pop #endif // defined(__clang__) -_EXPORT_STD /* TRANSITION, VSO-1538698 */ template +template _NODISCARD int _Codecvt_do_length( const _CvtTy& _Cvt, _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) { // return p - _First1, for the largest value p in [_First1, _Last1] such that _Cvt will successfully convert