From fcde68b05e6cc69ae08949e656502546a9a445de Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 14:43:36 -0700 Subject: [PATCH 01/11] PowerShell 7.2.2, Python 3.10.3. --- azure-devops/provision-image.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index cf878e2f1b7..ce04a56e2c8 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) { $PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe' # https://github.com/PowerShell/PowerShell/releases/latest - $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.2.1/PowerShell-7.2.1-win-x64.zip' + $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.2.2/PowerShell-7.2.2-win-x64.zip' Write-Host "Downloading: $PowerShellZipUrl" $ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl $PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe' @@ -142,7 +142,7 @@ $Workloads = @( $ReleaseInPath = 'Preview' $Sku = 'Enterprise' $VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe' -$PythonUrl = 'https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe' +$PythonUrl = 'https://www.python.org/ftp/python/3.10.3/python-3.10.3-amd64.exe' $CudaUrl = ` 'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe' From 35786d8d7fbe0b2368cc2f42519558f19178e7f4 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 15:25:04 -0700 Subject: [PATCH 02/11] New pool: StlBuild-2022-03-17-T1445 --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0978d22be65..ac63cc7cb6f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ variables: tmpDir: 'D:\Temp' buildOutputLocation: 'D:\build' -pool: 'StlBuild-2022-02-08-T1334' +pool: 'StlBuild-2022-03-17-T1445' stages: - stage: Code_Format From 8708d7118abdb3f93c403b1d44849a47202ed7cf Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 15:27:18 -0700 Subject: [PATCH 03/11] README.md: Mention 17.2 Preview 2. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 684a2a75209..e2ab2d4082e 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,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.1 Preview 5 or later. +1. Install Visual Studio 2022 17.2 Preview 2 or later. * 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. @@ -155,7 +155,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.1 Preview 5 or later. +1. Install Visual Studio 2022 17.2 Preview 2 or later. * 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. From c55727cc36fc72942f2a62a11b513e926c7511ea Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 17:14:04 -0700 Subject: [PATCH 04/11] Try using all processors. --- azure-devops/cmake-configure-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/cmake-configure-build.yml b/azure-devops/cmake-configure-build.yml index e868e80c376..c0d0cb989d1 100644 --- a/azure-devops/cmake-configure-build.yml +++ b/azure-devops/cmake-configure-build.yml @@ -21,7 +21,7 @@ steps: inputs: targetType: inline script: | - $testParallelism = $env:NUMBER_OF_PROCESSORS - 2 + $testParallelism = $env:NUMBER_OF_PROCESSORS Write-Host "##vso[task.setvariable variable=testParallelism;]$testParallelism" - script: | if exist "$(${{ parameters.buildOutputLocationVar }})" ( From 2184e0c0ed03645850a8a867dcddca3344171d85 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 18:06:10 -0700 Subject: [PATCH 05/11] DevCom-1162647 (constexpr variant stores wrong pointer) was fixed in 17.1. --- .../std/tests/P1502R1_standard_library_header_units/test.cpp | 4 ---- 1 file changed, 4 deletions(-) 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 3cfe0751a47..757c38da53f 100644 --- a/tests/std/tests/P1502R1_standard_library_header_units/test.cpp +++ b/tests/std/tests/P1502R1_standard_library_header_units/test.cpp @@ -958,14 +958,10 @@ int main() { { puts("Testing ."); constexpr const char* cats = "CATS"; -#if 0 // TRANSITION, DevCom-1162647 (constexpr variant stores wrong pointer) constexpr variant var{in_place_type, cats}; static_assert(var.index() == 1); static_assert(holds_alternative(var)); static_assert(get(var) == cats); -#else // ^^^ no workaround / workaround vvv - const variant var{in_place_type, cats}; -#endif // ^^^ workaround ^^^ assert(var.index() == 1); assert(holds_alternative(var)); assert(get(var) == cats); From 5238b96cdc4d29af3470d5a700cab3bbee0c4624 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 18:14:40 -0700 Subject: [PATCH 06/11] Remove VSO-1466711 workaround. This was "`/scanDependencies` generates incorrect `"logical-name"` in JSON output". --- .../P1502R1_standard_library_header_units/custom_format.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py b/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py index 4cf472b9e0a..bcb09e3ec35 100644 --- a/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py +++ b/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py @@ -81,10 +81,7 @@ def getBuildSteps(self, test, litConfig, shared): with open(os.path.join(outputDir, f'{hdr}.module.json')) as file: jsonObject = json.load(file) objFilenames.append(jsonObject['rules'][0]['primary-output']) - # TRANSITION, VSO-1466711 fixed in VS 2022 17.2 Preview 2 - # os.path.basename(req['source-path']) should be req['logical-name'] - dep = [os.path.basename(req['source-path']) for req in jsonObject['rules'][0]['requires']] - remainingDependencies[hdr] = dep + remainingDependencies[hdr] = [req['logical-name'] for req in jsonObject['rules'][0]['requires']] # Build header units in topologically sorted order. while len(remainingDependencies) > 0: From 3085017d5615489a0046a6f512cc7618f481af7d Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 18:16:18 -0700 Subject: [PATCH 07/11] Remove VSO-1471374 workarounds. This was "Standard Library Header Units: Deduplication emits `fatal error C1116: unrecoverable error importing module`, with ``". --- .../std/tests/P1502R1_standard_library_header_units/test.cpp | 4 ---- 1 file changed, 4 deletions(-) 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 757c38da53f..b37127be0c4 100644 --- a/tests/std/tests/P1502R1_standard_library_header_units/test.cpp +++ b/tests/std/tests/P1502R1_standard_library_header_units/test.cpp @@ -321,7 +321,6 @@ int main() { assert(!f.is_open()); } -#if !defined(TEST_TOPO_SORT) || defined(_MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1471374 fixed in VS 2022 17.2p2 { puts("Testing ."); function f{multiplies{}}; @@ -332,7 +331,6 @@ int main() { assert(b(3) == 33); static_assert(b(3) == 33); } -#endif // ^^^ no workaround ^^^ { puts("Testing ."); @@ -865,7 +863,6 @@ int main() { assert(this_thread::get_id() != thread::id{}); } -#if !defined(TEST_TOPO_SORT) || defined(_MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1471374 fixed in VS 2022 17.2p2 { puts("Testing ."); constexpr tuple t{1729, 'c', 1.25}; @@ -876,7 +873,6 @@ int main() { static_assert(get(t) == 'c'); static_assert(get(t) == 1.25); } -#endif // ^^^ no workaround ^^^ { puts("Testing ."); From 5a5306f79e9ed53d611b74065ee3f9db01c77288 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 18:17:28 -0700 Subject: [PATCH 08/11] Remove VSO-1471382 workaround. This was "Standard Library Header Units: Deduplication emits `error C2672: 'count_if': no matching overloaded function found`". --- tests/std/tests/P1502R1_standard_library_header_units/test.cpp | 2 -- 1 file changed, 2 deletions(-) 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 b37127be0c4..80b90bf88ff 100644 --- a/tests/std/tests/P1502R1_standard_library_header_units/test.cpp +++ b/tests/std/tests/P1502R1_standard_library_header_units/test.cpp @@ -285,13 +285,11 @@ int main() { assert(!ep); } -#if !defined(TEST_TOPO_SORT) || defined(_MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1471382 fixed in VS 2022 17.2p2 { puts("Testing ."); constexpr int arr[]{11, 0, 22, 0, 33, 0, 44, 0, 55}; assert(count(execution::par, begin(arr), end(arr), 0) == 4); } -#endif // ^^^ no workaround ^^^ { puts("Testing ."); From 308f50bd6b41ec6773217666627395d3f84ca0e1 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 18:27:35 -0700 Subject: [PATCH 09/11] 17.2 Preview 2 added _rotl8, _rotl16, _rotr8, _rotr16 to . --- stl/inc/bit | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/stl/inc/bit b/stl/inc/bit index 520b20e1a7a..fe1d267f7fd 100644 --- a/stl/inc/bit +++ b/stl/inc/bit @@ -98,8 +98,12 @@ _NODISCARD constexpr _Ty rotl(const _Ty _Val, const int _Rotation) noexcept { return _rotl64(_Val, _Rotation); } else if constexpr (_Digits == 32) { return _rotl(_Val, _Rotation); + } else if constexpr (_Digits == 16) { + return _rotl16(_Val, static_cast(_Rotation)); + } else { + _STL_INTERNAL_STATIC_ASSERT(_Digits == 8); + return _rotl8(_Val, static_cast(_Rotation)); } - // TRANSITION: fallback to non-intrinsic case until changes } const auto _Remainder = _Rotation % _Digits; @@ -122,8 +126,12 @@ _NODISCARD constexpr _Ty rotr(const _Ty _Val, const int _Rotation) noexcept { return _rotr64(_Val, _Rotation); } else if constexpr (_Digits == 32) { return _rotr(_Val, _Rotation); + } else if constexpr (_Digits == 16) { + return _rotr16(_Val, static_cast(_Rotation)); + } else { + _STL_INTERNAL_STATIC_ASSERT(_Digits == 8); + return _rotr8(_Val, static_cast(_Rotation)); } - // TRANSITION: fallback to non-intrinsic case until changes } const auto _Remainder = _Rotation % _Digits; From d81842cea1e131a20df083f8f1636de1307fc481 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 18:30:58 -0700 Subject: [PATCH 10/11] Cleanup: Drop duplicate `using _CSTD FILE;` in . --- stl/inc/cstdio | 1 - 1 file changed, 1 deletion(-) diff --git a/stl/inc/cstdio b/stl/inc/cstdio index 9f8fd2fdca3..78aa8aac77b 100644 --- a/stl/inc/cstdio +++ b/stl/inc/cstdio @@ -34,7 +34,6 @@ _STD_BEGIN #pragma warning(push) #pragma warning(disable : 4995) // name was marked as #pragma deprecated -using _CSTD FILE; using _CSTD _Mbstatet; using _CSTD size_t; From 1624b21889ceeb6622678d5011f2b009e1314e95 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 17 Mar 2022 18:33:16 -0700 Subject: [PATCH 11/11] Cleanup: Centralize using-declarations in . --- stl/inc/csignal | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/stl/inc/csignal b/stl/inc/csignal index fc88191d7dc..720c6d11505 100644 --- a/stl/inc/csignal +++ b/stl/inc/csignal @@ -19,14 +19,10 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -#ifndef _M_CEE_PURE using _CSTD sig_atomic_t; using _CSTD raise; +#ifndef _M_CEE_PURE using _CSTD signal; - -#else // _M_CEE_PURE -using _CSTD sig_atomic_t; -using _CSTD raise; #endif // _M_CEE_PURE _STD_END