diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e712f36ad8..8b166a3d5a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT DEFINED CMAKE_TOOLCHAIN_FILE AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/vcpkg set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake") endif() -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.19) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) project(msvc_standard_libraries LANGUAGES CXX) diff --git a/README.md b/README.md index 570e9cedcf9..40546698950 100644 --- a/README.md +++ b/README.md @@ -143,10 +143,10 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem The STL uses boost-math headers to provide P0226R1 Mathematical Special Functions. We recommend using [vcpkg][] to acquire this dependency. -1. Install Visual Studio 2019 16.9 Preview 2 or later. +1. Install Visual Studio 2019 16.9 Preview 3 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.18 or later, and [Ninja][] 1.8.2 or later. + * Otherwise, install [CMake][] 3.19 or later, and [Ninja][] 1.10.2 or later. 2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository, `https://github.com/microsoft/STL`. 3. Open a terminal in the IDE with `` Ctrl + ` `` (by default) or press on "View" in the top bar, and then "Terminal". @@ -158,10 +158,10 @@ acquire this dependency. # How To Build With A Native Tools Command Prompt -1. Install Visual Studio 2019 16.9 Preview 2 or later. +1. Install Visual Studio 2019 16.9 Preview 3 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.18 or later, and [Ninja][] 1.8.2 or later. + * Otherwise, install [CMake][] 3.19 or later, and [Ninja][] 1.10.2 or later. 2. Open a command prompt. 3. Change directories to a location where you'd like a clone of this STL repository. 4. `git clone https://github.com/microsoft/STL` @@ -234,7 +234,7 @@ C:\Users\username\Desktop>dumpbin /IMPORTS .\example.exe | findstr msvcp # How To Run The Tests With A Native Tools Command Prompt 1. Follow either [How To Build With A Native Tools Command Prompt][] or [How To Build With The Visual Studio IDE][]. -2. Acquire [Python][] 3.9 or newer and have it on the `PATH` (or run it directly using its absolute or relative path). +2. Acquire [Python][] 3.9.1 or newer and have it on the `PATH` (or run it directly using its absolute or relative path). 3. Have LLVM's `bin` directory on the `PATH` (so `clang-cl.exe` is available). * We recommend selecting "C++ Clang tools for Windows" in the VS Installer. This will automatically add LLVM to the `PATH` of the x86 and x64 Native Tools Command Prompts, and will ensure that you're using a supported version. diff --git a/azure-devops/create-vmss.ps1 b/azure-devops/create-vmss.ps1 index 1434ce0ac48..963fb7f874a 100644 --- a/azure-devops/create-vmss.ps1 +++ b/azure-devops/create-vmss.ps1 @@ -17,6 +17,9 @@ or are running from Azure Cloud Shell. $ErrorActionPreference = 'Stop' +# https://aka.ms/azps-changewarnings +$Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true' + $Location = 'westus2' $Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd') $VMSize = 'Standard_D32as_v4' diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index ba9e940c575..8468b850ad6 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -50,36 +50,75 @@ Function Get-TempFilePath { return Join-Path $tempPath $tempName } +<# +.SYNOPSIS +Downloads and extracts a ZIP file to a newly created temporary subdirectory. + +.DESCRIPTION +DownloadAndExtractZip returns a path containing the extracted contents. + +.PARAMETER Url +The URL of the ZIP file to download. +#> +Function DownloadAndExtractZip { + Param( + [String]$Url + ) + + if ([String]::IsNullOrWhiteSpace($Url)) { + throw 'Missing Url' + } + + $ZipPath = Get-TempFilePath -Extension 'zip' + & curl.exe -L -o $ZipPath -s -S $Url + $TempSubdirPath = Get-TempFilePath -Extension 'dir' + Expand-Archive -Path $ZipPath -DestinationPath $TempSubdirPath -Force + + return $TempSubdirPath +} + $TranscriptPath = 'C:\provision-image-transcript.txt' if ([string]::IsNullOrEmpty($AdminUserPassword)) { - Start-Transcript -Path $TranscriptPath + Start-Transcript -Path $TranscriptPath -UseMinimalHeader } else { Write-Host 'AdminUser password supplied; switching to AdminUser.' - $PsExecPath = Get-TempFilePath -Extension 'exe' - Write-Host "Downloading psexec to: $PsExecPath" - & curl.exe -L -o $PsExecPath -s -S https://live.sysinternals.com/PsExec64.exe + + # https://docs.microsoft.com/en-us/sysinternals/downloads/psexec + $PsToolsZipUrl = 'https://download.sysinternals.com/files/PSTools.zip' + Write-Host "Downloading: $PsToolsZipUrl" + $ExtractedPsToolsPath = DownloadAndExtractZip -Url $PsToolsZipUrl + $PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe' + + # https://github.com/PowerShell/PowerShell/releases/latest + $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.1.1/PowerShell-7.1.1-win-x64.zip' + Write-Host "Downloading: $PowerShellZipUrl" + $ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl + $PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe' + $PsExecArgs = @( '-u', 'AdminUser', '-p', - $AdminUserPassword, + 'AdminUserPassword_REDACTED', '-accepteula', + '-i', '-h', - 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', + $PwshPath, '-ExecutionPolicy', 'Unrestricted', '-File', $PSCommandPath ) - Write-Host "Executing: $PsExecPath $PsExecArgs" + $PsExecArgs[3] = $AdminUserPassword $proc = Start-Process -FilePath $PsExecPath -ArgumentList $PsExecArgs -Wait -PassThru Write-Host 'Reading transcript...' Get-Content -Path $TranscriptPath Write-Host 'Cleaning up...' - Remove-Item $PsExecPath + Remove-Item -Recurse -Path $ExtractedPsToolsPath + Remove-Item -Recurse -Path $ExtractedPowerShellPath exit $proc.ExitCode } @@ -100,7 +139,7 @@ $Workloads = @( $ReleaseInPath = 'Preview' $Sku = 'Enterprise' $VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/pre/vs_enterprise.exe' -$PythonUrl = 'https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe' +$PythonUrl = 'https://www.python.org/ftp/python/3.9.1/python-3.9.1-amd64.exe' # https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk $WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854' @@ -315,7 +354,7 @@ Function PipInstall { try { Write-Host "Installing or upgrading $Package..." - python.exe -m pip install --upgrade $Package + python.exe -m pip install --progress-bar off --upgrade $Package Write-Host "Done installing or upgrading $Package." } catch { @@ -358,3 +397,9 @@ Write-Host 'Finished updating PATH!' PipInstall pip PipInstall psutil + +# https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set#verification-settings +Write-Host 'Enabling test-signed kernel-mode drivers...' +bcdedit /set testsigning on + +Write-Host 'Done!' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3fa907668b9..f342d73784b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ variables: tmpDir: 'D:\Temp' -pool: 'StlBuild-2020-12-08-1' +pool: 'StlBuild-2021-01-20-2' stages: - stage: Code_Format diff --git a/tests/std/tests/P0220R1_optional/test.cpp b/tests/std/tests/P0220R1_optional/test.cpp index a7bb292e541..ec0b2904315 100644 --- a/tests/std/tests/P0220R1_optional/test.cpp +++ b/tests/std/tests/P0220R1_optional/test.cpp @@ -5495,13 +5495,17 @@ constexpr int test() { optional opt(in_place, 2); Y y(3); +#ifndef __EDG__ // TRANSITION, VSO-1268140 assert(std::move(opt).value_or(y) == 2); assert(*opt == 0); +#endif // ^^^ no workaround ^^^ } { optional opt(in_place, 2); +#ifndef __EDG__ // TRANSITION, VSO-1268140 assert(std::move(opt).value_or(Y(3)) == 2); assert(*opt == 0); +#endif // ^^^ no workaround ^^^ } { optional opt;