Skip to content

Commit

Permalink
Merge branch 'main' into fix155 and fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
fsb4000 committed Nov 21, 2021
2 parents 5f9bb2a + 3c2fd04 commit b8dfa65
Show file tree
Hide file tree
Showing 97 changed files with 3,524 additions and 1,701 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/update-status-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ">=16.0.0"
- name: Run gather_stats.js
- name: Install Packages
run: |
npm ci
SECRET_GITHUB_PERSONAL_ACCESS_TOKEN="${{ github.token }}" node gather_stats.js
- name: Compile gather_stats.ts
run: |
npx tsc
- name: Run gather_stats.js
run: |
SECRET_GITHUB_PERSONAL_ACCESS_TOKEN="${{ github.token }}" node built/gather_stats.js
- name: Commit Changes
run: |
git config user.name "github-actions[bot]"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ issue. The [bug tag][] and [enhancement tag][] are being populated.

# Goals

We're implementing the latest C++ Working Draft, currently [N4892][], which will eventually become the next C++
We're implementing the latest C++ Working Draft, currently [N4901][], which will eventually become the next C++
International Standard. The terms Working Draft (WD) and Working Paper (WP) are interchangeable; we often
informally refer to these drafts as "the Standard" while being aware of the difference. (There are other relevant
Standards; for example, supporting `/std:c++14` and `/std:c++17` involves understanding how the C++14 and C++17
Expand Down Expand Up @@ -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.0 Preview 4 or later.
1. Install Visual Studio 2022 17.1 Preview 1 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.21 or later, and [Ninja][] 1.10.2 or later.
Expand All @@ -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.0 Preview 4 or later.
1. Install Visual Studio 2022 17.1 Preview 1 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.21 or later, and [Ninja][] 1.10.2 or later.
Expand Down Expand Up @@ -451,7 +451,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[LWG issues]: https://cplusplus.github.io/LWG/lwg-toc.html
[LWG tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3ALWG
[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
[N4892]: https://wg21.link/n4892
[N4901]: https://wg21.link/n4901
[NOTICE.txt]: NOTICE.txt
[Ninja]: https://ninja-build.org
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=main
Expand Down
6 changes: 3 additions & 3 deletions azure-devops/create-vmss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ $Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true'

$Location = 'westus2'
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D32ds_v4'
$VMSize = 'Standard_D32as_v4'
$ProtoVMName = 'PROTOTYPE'
$LiveVMPrefix = 'BUILD'
$ImagePublisher = 'MicrosoftWindowsDesktop'
$ImageOffer = 'Windows-10'
$ImageSku = '21h1-ent-g2'
$ImageOffer = 'windows-11'
$ImageSku = 'win11-21h2-ent'

$ProgressActivity = 'Creating Scale Set'
$TotalProgress = 14
Expand Down
59 changes: 15 additions & 44 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.4/PowerShell-7.1.4-win-x64.zip'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down Expand Up @@ -141,10 +141,7 @@ $Workloads = @(
$ReleaseInPath = 'Preview'
$Sku = 'Enterprise'
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe'

# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
$WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854'
$PythonUrl = 'https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe'

$CudaUrl = `
'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe'
Expand Down Expand Up @@ -270,36 +267,6 @@ Function InstallPython {
}
}

<#
.SYNOPSIS
Installs the Windows Driver Kit.
.DESCRIPTION
InstallWindowsDriverKit installs the Windows Driver Kit from the supplied URL.
.PARAMETER Url
The URL of the Windows Driver Kit installer.
#>
Function InstallWindowsDriverKit {
Param(
[String]$Url
)

Write-Host 'Downloading the Windows Driver Kit...'
[string]$installerPath = Get-TempFilePath -Extension 'exe'
curl.exe -L -o $installerPath -s -S $Url
Write-Host 'Installing the Windows Driver Kit...'
$proc = Start-Process -FilePath cmd.exe -ArgumentList `
@('/c', 'start', '/wait', $installerPath, '/quiet', '/features', '+') -Wait -PassThru
$exitCode = $proc.ExitCode
if ($exitCode -eq 0) {
Write-Host 'Installation successful!'
}
else {
Write-Error "Installation failed! Exited with $exitCode."
}
}

<#
.SYNOPSIS
Installs NVIDIA's CUDA Toolkit.
Expand Down Expand Up @@ -377,31 +344,35 @@ Add-MpPreference -ExclusionProcess python.exe

InstallPython $PythonUrl
InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl
InstallWindowsDriverKit $WindowsDriverKitUrl
InstallCuda -Url $CudaUrl -Features $CudaFeatures

Write-Host 'Updating PATH...'

# Step 1: Read the system path, which was just updated by installing Python.
$environmentKey = Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name Path
$currentSystemPath = [Environment]::GetEnvironmentVariable("Path", "Machine")

# Step 2: Update the local path (for this running script), so PipInstall can run python.exe.
# Additional directories can be added here (e.g. if we extracted a zip file
# or installed something that didn't update the system path).
$Env:PATH="$($environmentKey.Path)"
$Env:PATH="$($currentSystemPath)"

# Step 3: Update the system path, permanently recording any additional directories that were added in the previous step.
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' `
-Name Path `
-Value "$Env:PATH"
[Environment]::SetEnvironmentVariable("Path", "$Env:PATH", "Machine")

Write-Host 'Finished updating PATH!'

Write-Host 'Running PipInstall...'

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 'Finished running PipInstall!'

Write-Host 'Setting other environment variables...'

# The STL's PR/CI builds are totally unrepresentative of customer usage.
[Environment]::SetEnvironmentVariable("VSCMD_SKIP_SENDTELEMETRY", "1", "Machine")

Write-Host 'Finished setting other environment variables!'

Write-Host 'Done!'
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variables:
tmpDir: 'D:\Temp'
buildOutputLocation: 'D:\build'

pool: 'StlBuild-2021-09-14'
pool: 'StlBuild-2021-11-09'

stages:
- stage: Code_Format
Expand Down
2 changes: 1 addition & 1 deletion docs/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"type": "git",
"git": {
"repositoryUrl": "https://github.com/microsoft/STL.git",
"commitHash": "1866b848f0175c3361a916680a4318e7f0cc5482"
"commitHash": "ee5a216b516ef033d9153b324842369eee7653d1"
}
}
},
Expand Down
16 changes: 12 additions & 4 deletions stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,16 @@ set(IMPLIB_SOURCES
)

# The following files are linked in msvcp140[d][_clr].dll.
set (DLL_SOURCES
set(DLL_SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/dllmain.cpp
${CMAKE_CURRENT_LIST_DIR}/src/instances.cpp
)

# Sources that must not be compiled with /GL, since they contain CRT initializers.
set(INITIALIZER_SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/winapisupp.cpp
)

set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/StlCompareStringA.cpp
${CMAKE_CURRENT_LIST_DIR}/src/StlCompareStringW.cpp
Expand Down Expand Up @@ -311,7 +316,6 @@ set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/wclog.cpp
${CMAKE_CURRENT_LIST_DIR}/src/wcout.cpp
${CMAKE_CURRENT_LIST_DIR}/src/winapinls.cpp
${CMAKE_CURRENT_LIST_DIR}/src/winapisupp.cpp
${CMAKE_CURRENT_LIST_DIR}/src/wiostrea.cpp
${CMAKE_CURRENT_LIST_DIR}/src/wlocale.cpp
${CMAKE_CURRENT_LIST_DIR}/src/xalloc.cpp
Expand Down Expand Up @@ -443,12 +447,16 @@ function(add_stl_dlls D_SUFFIX THIS_CONFIG_DEFINITIONS THIS_CONFIG_COMPILE_OPTIO
target_compile_definitions(msvcp${D_SUFFIX}_objects PRIVATE "CRTDLL2;_DLL;${THIS_CONFIG_DEFINITIONS}")
target_compile_options(msvcp${D_SUFFIX}_objects PRIVATE "${THIS_CONFIG_COMPILE_OPTIONS};${GL_FLAG};/EHsc")

add_library(msvcp${D_SUFFIX}_init_objects OBJECT ${INITIALIZER_SOURCES})
target_compile_definitions(msvcp${D_SUFFIX}_init_objects PRIVATE "CRTDLL2;_DLL;${THIS_CONFIG_DEFINITIONS}")
target_compile_options(msvcp${D_SUFFIX}_init_objects PRIVATE "${THIS_CONFIG_COMPILE_OPTIONS};/EHsc")

add_library(msvcp${D_SUFFIX}_eha_objects OBJECT ${EHA_SOURCES})
target_compile_definitions(msvcp${D_SUFFIX}_eha_objects PRIVATE "CRTDLL2;_DLL;${THIS_CONFIG_DEFINITIONS}")
target_compile_options(msvcp${D_SUFFIX}_eha_objects PRIVATE "${THIS_CONFIG_COMPILE_OPTIONS};${GL_FLAG};/EHa")

add_library(msvcp${D_SUFFIX} SHARED)
target_link_libraries(msvcp${D_SUFFIX} PRIVATE msvcp${D_SUFFIX}_eha_objects msvcp${D_SUFFIX}_objects "${TOOLSET_LIB}/vcruntime${D_SUFFIX}.lib" "${TOOLSET_LIB}/msvcrt${D_SUFFIX}.lib" "ucrt${D_SUFFIX}.lib")
target_link_libraries(msvcp${D_SUFFIX} PRIVATE msvcp${D_SUFFIX}_eha_objects msvcp${D_SUFFIX}_objects msvcp${D_SUFFIX}_init_objects "${TOOLSET_LIB}/vcruntime${D_SUFFIX}.lib" "${TOOLSET_LIB}/msvcrt${D_SUFFIX}.lib" "ucrt${D_SUFFIX}.lib")
set_target_properties(msvcp${D_SUFFIX} PROPERTIES ARCHIVE_OUTPUT_NAME "msvcp140_base${D_SUFFIX}${VCLIBS_SUFFIX}")
set_target_properties(msvcp${D_SUFFIX} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
set_target_properties(msvcp${D_SUFFIX} PROPERTIES OUTPUT_NAME "msvcp140${D_SUFFIX}${VCLIBS_SUFFIX}")
Expand Down Expand Up @@ -538,7 +546,7 @@ function(add_stl_statics FLAVOR_SUFFIX THIS_CONFIG_DEFINITIONS THIS_CONFIG_COMPI
target_compile_definitions(libcpmt${FLAVOR_SUFFIX}_eha PRIVATE "${THIS_CONFIG_DEFINITIONS}")
target_compile_options(libcpmt${FLAVOR_SUFFIX}_eha PRIVATE "${THIS_CONFIG_COMPILE_OPTIONS};/EHa")

add_library(libcpmt${FLAVOR_SUFFIX} STATIC ${HEADERS} ${IMPLIB_SOURCES} ${SOURCES} ${STATIC_SOURCES})
add_library(libcpmt${FLAVOR_SUFFIX} STATIC ${HEADERS} ${IMPLIB_SOURCES} ${SOURCES} ${INITIALIZER_SOURCES} ${STATIC_SOURCES})
target_compile_definitions(libcpmt${FLAVOR_SUFFIX} PRIVATE "${THIS_CONFIG_DEFINITIONS}")
target_compile_options(libcpmt${FLAVOR_SUFFIX} PRIVATE "${THIS_CONFIG_COMPILE_OPTIONS};/EHsc")
target_link_libraries(libcpmt${FLAVOR_SUFFIX} PRIVATE Boost::math libcpmt${FLAVOR_SUFFIX}_eha std_init_once_begin_initialize std_init_once_complete)
Expand Down
Loading

0 comments on commit b8dfa65

Please sign in to comment.