diff --git a/CMakeLists.txt b/CMakeLists.txt index f272431024..cda20ac87a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.23) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) project(msvc_standard_libraries LANGUAGES CXX) @@ -81,7 +81,7 @@ add_compile_definitions( _CRT_DECLARE_NONSTDC_NAMES=1 _WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN10_CO) add_compile_options(/WX /Gy - "$<$:/diagnostics:caret;/W4;/w14265;/w15038;/d1FastFail;/guard:cf;/Z7;/Zp8;/std:c++latest;/permissive-;/Zc:threadSafeInit-;/Zl>" + "$<$:/diagnostics:caret;/W4;/w14265;/w15038;/fastfail;/guard:cf;/Z7;/Zp8;/std:c++latest;/permissive-;/Zc:threadSafeInit-;/Zl>" # note that /Zi generates debug info inside the object file, it's the same as /Z7 for msvc "$<$:/Zi;/W3;/nologo>") diff --git a/README.md b/README.md index 8ca535f5b8..b555afdde5 100644 --- a/README.md +++ b/README.md @@ -140,11 +140,11 @@ 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.3 Preview 1 or later. +1. Install Visual Studio 2022 17.3 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. - * Otherwise, install [CMake][] 3.22 or later, and [Ninja][] 1.10.2 or later. + * Otherwise, install [CMake][] 3.23 or later, and [Ninja][] 1.10.2 or later. * We recommend selecting "Python 3 64-bit" in the VS Installer. * Otherwise, make sure [Python][] 3.9 or later is available to CMake. 2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository, @@ -156,11 +156,11 @@ 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.3 Preview 1 or later. +1. Install Visual Studio 2022 17.3 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. - * Otherwise, install [CMake][] 3.22 or later, and [Ninja][] 1.10.2 or later. + * Otherwise, install [CMake][] 3.23 or later, and [Ninja][] 1.10.2 or later. * We recommend selecting "Python 3 64-bit" in the VS Installer. * Otherwise, make sure [Python][] 3.9 or later is available to CMake. 2. Open a command prompt. diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index 2bb4bb15b8..9ee4726a82 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -141,15 +141,9 @@ $Workloads = @( $ReleaseInPath = 'Preview' $Sku = 'Enterprise' $VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe' -$PythonUrl = 'https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe' +$PythonUrl = 'https://www.python.org/ftp/python/3.10.5/python-3.10.5-amd64.exe' -$CudaUrl = ` - 'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe' -$CudaFeatures = 'nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 ' + ` - 'nvdisasm_10.1 nvprof_10.1 visual_profiler_10.1 visual_studio_integration_10.1 cublas_10.1 cublas_dev_10.1 ' + ` - 'cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 ' + ` - 'cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1 ' + ` - 'occupancy_calculator_10.1 fortran_examples_10.1' +$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_511.23_windows.exe' $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' @@ -272,19 +266,14 @@ Function InstallPython { Installs NVIDIA's CUDA Toolkit. .DESCRIPTION -InstallCuda installs the CUDA Toolkit with the features specified as a -space-separated list of strings in $Features. +InstallCuda installs the CUDA Toolkit. .PARAMETER Url The URL of the CUDA installer. - -.PARAMETER Features -A space-separated list of features to install. #> Function InstallCuda { Param( - [String]$Url, - [String]$Features + [String]$Url ) try { @@ -292,7 +281,7 @@ Function InstallCuda { [string]$installerPath = Get-TempFilePath -Extension 'exe' curl.exe -L -o $installerPath -s -S $Url Write-Host 'Installing CUDA...' - $proc = Start-Process -FilePath $installerPath -ArgumentList @('-s ' + $Features) -Wait -PassThru + $proc = Start-Process -FilePath $installerPath -ArgumentList @('-s') -Wait -PassThru $exitCode = $proc.ExitCode if ($exitCode -eq 0) { Write-Host 'Installation successful!' @@ -347,7 +336,7 @@ Add-MpPreference -ExclusionProcess python.exe InstallPython $PythonUrl InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl -InstallCuda -Url $CudaUrl -Features $CudaFeatures +InstallCuda -Url $CudaUrl Write-Host 'Updating PATH...' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f98b2f81cf..85a1d0fed8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ variables: tmpDir: 'D:\Temp' buildOutputLocation: 'D:\build' -pool: 'StlBuild-2022-06-01-T1839' +pool: 'StlBuild-2022-06-14-T1744' stages: - stage: Code_Format diff --git a/stl/inc/format b/stl/inc/format index e3272f0b41..c8eab9a9f1 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -3351,16 +3351,8 @@ template <_Format_supported_charT _CharT, class _Traits> struct formatter, _CharT> : _Formatter_base, _CharT, _Basic_format_arg_type::_String_type> {}; -// TRANSITION, VSO-1444086 (remove _STL_DECLSPEC_NOINITALL) -#if defined(__clang__) || defined(__CUDACC__) || defined(__INTEL_COMPILER) || defined(__EDG__) -#define _STL_DECLSPEC_NOINITALL -#else // ^^^ not MSVC / MSVC vvv -#define _STL_DECLSPEC_NOINITALL \ - _Pragma("warning(push)") _Pragma("warning(disable : 4845)") __declspec(no_init_all) _Pragma("warning(pop)") -#endif // ^^^ MSVC ^^^ - template -struct _STL_DECLSPEC_NOINITALL _Basic_format_string { +struct _Basic_format_string { basic_string_view<_CharT> _Str; template @@ -3372,8 +3364,6 @@ struct _STL_DECLSPEC_NOINITALL _Basic_format_string { } }; -#undef _STL_DECLSPEC_NOINITALL - template using _Fmt_string = _Basic_format_string...>; diff --git a/stl/inc/vector b/stl/inc/vector index 421794447c..d9d70aca79 100644 --- a/stl/inc/vector +++ b/stl/inc/vector @@ -2048,13 +2048,12 @@ private: _Iterator_base12** _Pnext = &_Mypair._Myval2._Myproxy->_Myfirstiter; while (*_Pnext) { const auto _Pnextptr = static_cast(**_Pnext)._Ptr; + const auto _Temp = *_Pnext; if (_Pnextptr < _First || _Last < _Pnextptr) { // skip the iterator - const auto _Temp = *_Pnext; // TRANSITION, VSO-1269037 - _Pnext = &_Temp->_Mynextiter; + _Pnext = &_Temp->_Mynextiter; } else { // orphan the iterator - const auto _Temp = *_Pnext; // TRANSITION, VSO-1269037 - _Temp->_Myproxy = nullptr; - *_Pnext = _Temp->_Mynextiter; + _Temp->_Myproxy = nullptr; + *_Pnext = _Temp->_Mynextiter; } } } @@ -3280,7 +3279,7 @@ public: _Iterator_base12** _Pnext = &this->_Myproxy->_Myfirstiter; while (*_Pnext) { // test offset from beginning of vector const auto& _Pnextiter = static_cast(**_Pnext); - const auto _Temp = *_Pnext; // TRANSITION, VSO-1269037 + const auto _Temp = *_Pnext; if (!_Pnextiter._Myptr) { // orphan the iterator _Temp->_Myproxy = nullptr; *_Pnext = _Temp->_Mynextiter; diff --git a/stl/inc/xmemory b/stl/inc/xmemory index 9efff079ad..30e2493653 100644 --- a/stl/inc/xmemory +++ b/stl/inc/xmemory @@ -1209,8 +1209,7 @@ private: // adopted, remove self from list _Iterator_base12** _Pnext = &_Myproxy->_Myfirstiter; while (*_Pnext && *_Pnext != this) { - const auto _Temp = *_Pnext; // TRANSITION, VSO-1269037 - _Pnext = &_Temp->_Mynextiter; + _Pnext = &(*_Pnext)->_Mynextiter; } _STL_VERIFY(*_Pnext, "ITERATOR LIST CORRUPTED!"); @@ -1231,10 +1230,9 @@ _CONSTEXPR20 void _Container_base12::_Orphan_all_unlocked_v3() noexcept { } // proxy allocated, drain it - for (auto& _Pnext = _Myproxy->_Myfirstiter; _Pnext; _Pnext = _Pnext->_Mynextiter) { // TRANSITION, VSO-1269037 + for (auto _Pnext = _STD exchange(_Myproxy->_Myfirstiter, nullptr); _Pnext; _Pnext = _Pnext->_Mynextiter) { _Pnext->_Myproxy = nullptr; } - _Myproxy->_Myfirstiter = nullptr; } _CONSTEXPR20 void _Container_base12::_Orphan_all() noexcept { diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index 29c14a5a8c..42f241c626 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -622,10 +622,8 @@ #ifndef _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH #if defined(__CUDACC__) && defined(__CUDACC_VER_MAJOR__) -#if __CUDACC_VER_MAJOR__ < 10 \ - || (__CUDACC_VER_MAJOR__ == 10 \ - && (__CUDACC_VER_MINOR__ < 1 || (__CUDACC_VER_MINOR__ == 1 && __CUDACC_VER_BUILD__ < 243))) -#error STL1002: Unexpected compiler version, expected CUDA 10.1 Update 2 or newer. +#if __CUDACC_VER_MAJOR__ < 11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ < 6) +#error STL1002: Unexpected compiler version, expected CUDA 11.6 or newer. #endif // ^^^ old CUDA ^^^ #elif defined(__EDG__) // not attempting to detect __EDG_VERSION__ being less than expected @@ -1616,9 +1614,5 @@ compiler option, or define _ALLOW_RTCc_IN_STL to acknowledge that you have recei #define _STL_INTERNAL_STATIC_ASSERT(...) #endif // _ENABLE_STL_INTERNAL_CHECK -#ifndef _MSVC_CONSTEXPR // TRANSITION, VS2022v17.3p2 -#define _MSVC_CONSTEXPR -#endif - #endif // _STL_COMPILER_PREPROCESSOR #endif // _YVALS_CORE_H_ diff --git a/tests/std/include/timezone_data.hpp b/tests/std/include/timezone_data.hpp index 8540c957af..be71968f2f 100644 --- a/tests/std/include/timezone_data.hpp +++ b/tests/std/include/timezone_data.hpp @@ -157,21 +157,7 @@ namespace LA { template void run_tz_test(TestFunction test_function) { try { -#ifdef _MSVC_INTERNAL_TESTING - try { - (void) get_tzdb(); - } catch (const system_error& ex) { - if (ex.code() == error_code{126 /* ERROR_MOD_NOT_FOUND */, system_category()}) { - // Skip testing when we can't load icu.dll on an internal test machine running an older OS. - exit(EXIT_SUCCESS); - } - - throw; // Report any other errors. - } -#endif // _MSVC_INTERNAL_TESTING - test_function(); - } catch (const system_error& ex) { cerr << "Test threw system_error: " << ex.what() << "\n"; cerr << "With error_code: " << ex.code() << "\n"; 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 ff6af756b1..633ab10773 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 10.1 Update 2 rejected VS 2022 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" diff --git a/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp b/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp index ba796d1b3f..2eabf16f7d 100644 --- a/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp +++ b/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp @@ -1101,10 +1101,8 @@ void test() { #if !defined(_DLL) || _ITERATOR_DEBUG_LEVEL == DEFAULT_IDL_SETTING test_locale(); -#ifndef _MSVC_INTERNAL_TESTING // TRANSITION, the Windows version on Contest VMs doesn't always understand ".UTF-8" assert(setlocale(LC_ALL, ".UTF-8") != nullptr); test_locale(); -#endif // _MSVC_INTERNAL_TESTING #endif // !defined(_DLL) || _ITERATOR_DEBUG_LEVEL == DEFAULT_IDL_SETTING } diff --git a/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp b/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp index bc17230940..de4b9031eb 100644 --- a/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp +++ b/tests/std/tests/P0645R10_text_formatting_formatting/test.cpp @@ -1336,14 +1336,12 @@ void libfmt_formatter_test_runtime_precision() { template void test_locale_specific_formatting_without_locale() { -#ifndef _MSVC_INTERNAL_TESTING // TRANSITION, the Windows version on Contest VMs doesn't always understand ".UTF-8" #if !defined(_DLL) || _ITERATOR_DEBUG_LEVEL == DEFAULT_IDL_SETTING locale loc("en-US.UTF-8"); locale::global(loc); assert(format(STR("{:L}"), 12345) == STR("12,345")); locale::global(locale::classic()); #endif // !defined(_DLL) || _ITERATOR_DEBUG_LEVEL == DEFAULT_IDL_SETTING -#endif // _MSVC_INTERNAL_TESTING } template diff --git a/tests/std/tests/P0645R10_text_formatting_utf8/test.cpp b/tests/std/tests/P0645R10_text_formatting_utf8/test.cpp index 425485e004..553aba9afe 100644 --- a/tests/std/tests/P0645R10_text_formatting_utf8/test.cpp +++ b/tests/std/tests/P0645R10_text_formatting_utf8/test.cpp @@ -156,8 +156,6 @@ int main() { assert(setlocale(LC_ALL, ".932") != nullptr); run_tests(); -#ifndef _MSVC_INTERNAL_TESTING // TRANSITION, the Windows version on Contest VMs doesn't always understand ".UTF-8" assert(setlocale(LC_ALL, ".UTF-8") != nullptr); run_tests(); -#endif } diff --git a/tests/std/tests/P1502R1_standard_library_header_units/test.cpp b/tests/std/tests/P1502R1_standard_library_header_units/test.cpp index fad9faad16..6c7525d7d0 100644 --- a/tests/std/tests/P1502R1_standard_library_header_units/test.cpp +++ b/tests/std/tests/P1502R1_standard_library_header_units/test.cpp @@ -343,7 +343,6 @@ __declspec(dllexport) // for test export main to have it named even static_assert(b(3) == 33); } -#if defined(_MSVC_INTERNAL_TESTING) || defined(TEST_TOPO_SORT) // TRANSITION, VSO-1496084 fixed in 17.3 Preview 2 { puts("Testing ."); promise p{}; @@ -353,7 +352,6 @@ __declspec(dllexport) // for test export main to have it named even assert(f.wait_for(chrono::seconds{0}) == future_status::ready); assert(f.get() == 1729); } -#endif // ^^^ no workaround ^^^ { puts("Testing ."); @@ -799,7 +797,6 @@ __declspec(dllexport) // for test export main to have it named even assert(caught_puppies); } -#if defined(_MSVC_INTERNAL_TESTING) || defined(TEST_TOPO_SORT) // TRANSITION, VSO-1496084 fixed in 17.3 Preview 2 { puts("Testing ."); vector vec; @@ -835,7 +832,6 @@ __declspec(dllexport) // for test export main to have it named even 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1, -1000}; assert(equal(vec.begin(), vec.end(), begin(expected_val), end(expected_val))); } -#endif // ^^^ no workaround ^^^ { puts("Testing ."); diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index c7a63ec7f9..e833fc075b 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.23) project(msvc_standard_libraries_tools LANGUAGES CXX) add_subdirectory(format) diff --git a/tools/format/CMakeLists.txt b/tools/format/CMakeLists.txt index d1af073445..e737a18f10 100644 --- a/tools/format/CMakeLists.txt +++ b/tools/format/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.23) project(msvc_standard_libraries_format NONE) set(did_search OFF) diff --git a/tools/validate/CMakeLists.txt b/tools/validate/CMakeLists.txt index f18374bc8d..dd373d9cb8 100644 --- a/tools/validate/CMakeLists.txt +++ b/tools/validate/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.23) project(msvc_standard_libraries_validate LANGUAGES CXX) add_executable(validate-binary validate.cpp)