Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
97161cd
Fix comparison operators and `get` of `array` (#4041)
frederick-vs-ja Sep 22, 2023
bb86444
Make `to_array` ADL-proof (#4042)
frederick-vs-ja Sep 22, 2023
48eedd3
ASAN found _two_ bugs in `_Copy_vbool`! (#4045)
CaseyCarter Sep 22, 2023
6735beb
MSBuild Project Refactor (#4054)
CaseyCarter Sep 27, 2023
4751057
Add ASAN coverage for all STL tests (#4052)
CaseyCarter Sep 29, 2023
f3f753d
P1169R4 `static` `operator()` (#4053)
StephanTLavavej Oct 4, 2023
94d9fdd
`<source_location>`: Light up detailed `function_name()` for Clang 17…
StephanTLavavej Oct 4, 2023
172d0c0
[ASan] Disable annotations on unsupported platforms (#4058)
strega-nil-ms Oct 4, 2023
04742ec
Update _MSVC_STL_UPDATE to October 2023 (#4062)
Ananyasingh2002 Oct 4, 2023
b1d81af
Add C4868 to _STL_DISABLED_WARNINGS (#4067)
tiagomacarios Oct 4, 2023
623813c
`<deque>`: Fix iterator arithmetic (#4049)
frederick-vs-ja Oct 4, 2023
8d44ff0
`<functional>`: Fixes around `not_fn` (#4057)
frederick-vs-ja Oct 4, 2023
9e20399
Implement LWG-3561 Issue with internal counter in `discard_block_engi…
frederick-vs-ja Oct 4, 2023
283cf32
Add '*' tags to all non-tagged configs (#4068)
CaseyCarter Oct 4, 2023
d61f7e0
P2675R1 `<format>` generator converted from C++ to Python (#3994)
fsb4000 Oct 6, 2023
b448869
build and test infra cleanup (#4069)
CaseyCarter Oct 6, 2023
78f5939
`<deque>`: Use unchecked iterators (#4071)
frederick-vs-ja Oct 6, 2023
157aecc
`<memory>`: Re-fancy the raw pointer in `_Ref_count_unbounded_array_a…
frederick-vs-ja Oct 7, 2023
f362f7d
Fix ASAN CI failure caused by stealth merge conflict (#4075)
StephanTLavavej Oct 7, 2023
05b3152
Toolset update: VS 2022 17.8 Preview 3 (#4083)
StephanTLavavej Oct 14, 2023
a9123e8
Clean up emitted files as the test harness runs (#4086)
StephanTLavavej Oct 14, 2023
8d6922a
Lifetime cleanups for `basic_string` (#4047)
achabense Oct 14, 2023
36a6a3e
`<xstring>`: Use `memmove` in construction of `basic_string` when the…
frederick-vs-ja Oct 14, 2023
33ae7d2
`<format>`: Guard one use of `_MSVC_EXECUTION_CHARACTER_SET` (#4076)
cpplearner Oct 14, 2023
1c59a20
README.md: Update Azure Pipelines status badges (#4085)
StephanTLavavej Oct 14, 2023
b9fee9b
Merge branch 'main' into flat_set-17.8p3
StephanTLavavej Oct 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ which ships as part of the MSVC toolset and the Visual Studio IDE.
* Our [Changelog][] tracks which updates to this repository appear in each VS release.
* Our [Status Chart][] displays our overall progress over time.
* Join our [Discord server][].

[![Build Status](https://dev.azure.com/vclibs/STL/_apis/build/status/microsoft.STL?branchName=main)][Pipelines]
* [![CI Status Badge][STL-CI-badge]][STL-CI-link] (STL-CI build status)
* [![ASan CI Status Badge][STL-ASan-CI-badge]][STL-ASan-CI-link] (STL-ASan-CI build status)

# What This Repo Is Useful For

Expand Down Expand Up @@ -141,13 +141,12 @@ 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.8 Preview 2 or later.
1. Install Visual Studio 2022 17.8 Preview 3 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.27.0 or later, and [Ninja][] 1.11.0 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.
* Make sure [Python][] 3.12 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,
`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".
Expand All @@ -157,13 +156,12 @@ 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.8 Preview 2 or later.
1. Install Visual Studio 2022 17.8 Preview 3 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.27.0 or later, and [Ninja][] 1.11.0 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.
* Make sure [Python][] 3.12 or later is available to CMake.
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 --recurse-submodules`
Expand Down Expand Up @@ -232,7 +230,7 @@ C:\Users\username\Desktop>dumpbin /DEPENDENTS .\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.12 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.
Expand Down Expand Up @@ -535,7 +533,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[N4958]: https://wg21.link/n4958
[NOTICE.txt]: NOTICE.txt
[Ninja]: https://ninja-build.org
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=main
[STL-CI-badge]: https://dev.azure.com/vclibs/STL/_apis/build/status%2FSTL-CI?branchName=main "STL-CI"
[STL-CI-link]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=main
[STL-ASan-CI-badge]: https://dev.azure.com/vclibs/STL/_apis/build/status%2FSTL-ASan-CI?branchName=main "STL-ASan-CI"
[STL-ASan-CI-link]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=5&branchName=main
[Python]: https://www.python.org/downloads/windows/
[Roadmap]: https://github.com/microsoft/STL/wiki/Roadmap
[Status Chart]: https://microsoft.github.io/STL/
Expand Down
49 changes: 49 additions & 0 deletions azure-devops/asan-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Build STL targeting x86 and x64, and run extra ASan testing

variables:
- template: config.yml
- name: testSelection
value: '-R stlasan' # Restrict to "stlasan" test

pr: none
trigger: none

schedules:
- cron: '0 2 * * *'
displayName: ASan-Daily-CI
branches:
include:
- main

stages:
- stage: Build_And_Test_x64
displayName: 'Build and Test x64'
pool:
name: ${{ variables.poolName }}
demands: ${{ variables.poolDemands }}
jobs:
- template: native-build-test.yml
parameters:
targetPlatform: x64
vsDevCmdArch: amd64
buildBenchmarks: false
testSelection: ${{ variables.testSelection }}

- stage: Build_And_Test_x86
displayName: 'Build and Test x86'
dependsOn: []
pool:
name: ${{ variables.poolName }}
demands: ${{ variables.poolDemands }}
jobs:
- template: native-build-test.yml
parameters:
targetPlatform: x86
vsDevCmdArch: x86
buildBenchmarks: false
testSelection: ${{ variables.testSelection }}

# no coverage for ARM and ARM64
46 changes: 26 additions & 20 deletions azure-devops/cmake-configure-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ parameters:
type: string
- name: targetPlatform
type: string
- name: buildOutputLocationVar
type: string
default: buildOutputLocation
- name: benchmarkBuildOutputLocationVar
type: string
default: benchmarkBuildOutputLocation
- name: buildBenchmarks
type: boolean
- name: cmakeAdditionalFlags
type: string
default: ''
- name: litFlags
type: object
default:
- '--timeout=240'
- '-j$(testParallelism)'
- '--xunit-xml-output=$(buildOutputLocation)/test-results.xml'
- '--order=lexical'
- '--num-shards=$(System.TotalJobsInPhase)'
- '--run-shard=$(System.JobPositionInPhase)'

steps:
- task: PowerShell@2
displayName: 'Get Test Parallelism'
Expand All @@ -27,47 +33,47 @@ steps:
$testParallelism = $env:NUMBER_OF_PROCESSORS
Write-Host "##vso[task.setvariable variable=testParallelism;]$testParallelism"
- script: |
if exist "$(${{ parameters.buildOutputLocationVar }})" (
rmdir /S /Q "$(${{ parameters.buildOutputLocationVar }})"
if exist "$(buildOutputLocation)" (
rmdir /S /Q "$(buildOutputLocation)"
)
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
cmake ${{ parameters.cmakeAdditionalFlags}} -G Ninja ^
cmake ${{ parameters.cmakeAdditionalFlags }} -G Ninja ^
-DCMAKE_CXX_COMPILER=cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DLIT_FLAGS=$(litFlags) ^
-DLIT_FLAGS=${{ join(';', parameters.litFlags) }} ^
-DSTL_USE_ANALYZE=ON ^
-S $(Build.SourcesDirectory) -B $(${{ parameters.buildOutputLocationVar }})
-S $(Build.SourcesDirectory) -B "$(buildOutputLocation)"
displayName: 'Configure the STL'
timeoutInMinutes: 2
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- script: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
cmake --build $(${{ parameters.buildOutputLocationVar }})
cmake --build "$(buildOutputLocation)"
displayName: 'Build the STL'
timeoutInMinutes: 5
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- script: |
if exist "$(${{ parameters.benchmarkBuildOutputLocationVar }})" (
rmdir /S /Q "$(${{ parameters.benchmarkBuildOutputLocationVar }})"
if exist "$(benchmarkBuildOutputLocation)" (
rmdir /S /Q "$(benchmarkBuildOutputLocation)"
)
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
cmake ${{ parameters.cmakeAdditionalFlags}} -G Ninja ^
cmake ${{ parameters.cmakeAdditionalFlags }} -G Ninja ^
-DCMAKE_CXX_COMPILER=cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DSTL_BINARY_DIR=$(${{ parameters.buildOutputLocationVar }}) ^
-S $(Build.SourcesDirectory)/benchmarks -B $(${{ parameters.benchmarkBuildOutputLocationVar }})
-DSTL_BINARY_DIR="$(buildOutputLocation)" ^
-S $(Build.SourcesDirectory)/benchmarks -B "$(benchmarkBuildOutputLocation)"
displayName: 'Configure the benchmarks'
timeoutInMinutes: 2
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
condition: ne('${{ parameters.benchmarkBuildOutputLocationVar }}', '')
condition: and(succeeded(), ${{ parameters.buildBenchmarks }})
- script: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
cmake --build $(${{ parameters.benchmarkBuildOutputLocationVar }})
cmake --build "$(benchmarkBuildOutputLocation)"
displayName: 'Build the benchmarks'
timeoutInMinutes: 2
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
condition: ne('${{ parameters.benchmarkBuildOutputLocationVar }}', '')
condition: and(succeeded(), ${{ parameters.buildBenchmarks }})
21 changes: 21 additions & 0 deletions azure-devops/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Common configuration used by both pipelines

variables:
- name: poolName
value: 'StlBuild-2023-10-10T1443-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals true'
readonly: true
- name: tmpDir
value: 'D:\Temp'
readonly: true
- name: buildOutputLocation
value: 'D:\build'
readonly: true
- name: benchmarkBuildOutputLocation
value: 'D:\benchmark'
readonly: true
19 changes: 6 additions & 13 deletions azure-devops/cross-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,14 @@ parameters:
type: string
- name: vsDevCmdArch
type: string
- name: buildOutputLocationVar
type: string
default: buildOutputLocation
- name: benchmarkBuildOutputLocationVar
type: string
default: benchmarkBuildOutputLocation
- name: buildBenchmarks
type: boolean
default: true
- name: numShards
type: number
default: 8
jobs:
- job: '${{ parameters.targetPlatform }}'
variables:
fixedFlags: '--timeout=240;--shuffle'
parallelismFlag: '-j$(testParallelism)'
xmlOutputFlag: '--xunit-xml-output=$(${{ parameters.buildOutputLocationVar }})/test-results.xml'
shardFlags: '--order=lexical;--num-shards=$(System.TotalJobsInPhase);--run-shard=$(System.JobPositionInPhase)'
litFlags: '$(fixedFlags);$(parallelismFlag);$(xmlOutputFlag);$(shardFlags)'
strategy:
parallel: ${{ parameters.numShards }}
timeoutInMinutes: 25
Expand All @@ -42,10 +33,12 @@ jobs:
hostArch: ${{ parameters.hostArch }}
targetArch: ${{ parameters.vsDevCmdArch }}
cmakeAdditionalFlags: '-DTESTS_BUILD_ONLY=ON'
benchmarkBuildOutputLocationVar: ${{ parameters.benchmarkBuildOutputLocationVar }}
buildBenchmarks: ${{ parameters.buildBenchmarks }}
- template: run-tests.yml
parameters:
hostArch: ${{ parameters.hostArch }}
targetPlatform: ${{ parameters.targetPlatform }}
targetArch: ${{ parameters.vsDevCmdArch }}
displayName: 'Build Tests'
# Exclude "stlasan" test (we don't yet support ASAN on ARM or ARM64)
testSelection: '-E stlasan'
22 changes: 10 additions & 12 deletions azure-devops/native-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@ parameters:
type: string
- name: vsDevCmdArch
type: string
- name: buildOutputLocationVar
type: string
default: buildOutputLocation
- name: benchmarkBuildOutputLocationVar
type: string
default: benchmarkBuildOutputLocation
- name: buildBenchmarks
type: boolean
default: true
- name: numShards
type: number
default: 8
# Parameters to pass to ctest to select the test(s) to run
- name: testSelection
type: string
# Exclude "stlasan" test by default
default: '-E stlasan'
jobs:
- job: '${{ parameters.targetPlatform }}'
variables:
fixedFlags: '--timeout=240;--shuffle'
parallelismFlag: '-j$(testParallelism)'
xmlOutputFlag: '--xunit-xml-output=$(${{ parameters.buildOutputLocationVar }})/test-results.xml'
shardFlags: '--order=lexical;--num-shards=$(System.TotalJobsInPhase);--run-shard=$(System.JobPositionInPhase)'
litFlags: '$(fixedFlags);$(parallelismFlag);$(xmlOutputFlag);$(shardFlags)'
strategy:
parallel: ${{ parameters.numShards }}
timeoutInMinutes: 25
Expand All @@ -38,8 +34,10 @@ jobs:
targetPlatform: ${{ parameters.targetPlatform }}
targetArch: ${{ parameters.vsDevCmdArch }}
hostArch: ${{ parameters.vsDevCmdArch }}
buildBenchmarks: ${{ parameters.buildBenchmarks }}
- template: run-tests.yml
parameters:
hostArch: ${{ parameters.vsDevCmdArch }}
targetPlatform: ${{ parameters.targetPlatform }}
targetArch: ${{ parameters.vsDevCmdArch }}
testSelection: ${{ parameters.testSelection }}
4 changes: 2 additions & 2 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.3.6/PowerShell-7.3.6-win-x64.zip'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.8/PowerShell-7.3.8-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down Expand Up @@ -136,7 +136,7 @@ $Workloads = @(
)

$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.11.5/python-3.11.5-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe'

$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_511.23_windows.exe'

Expand Down
14 changes: 7 additions & 7 deletions azure-devops/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

parameters:
- name: buildOutputLocationVar
type: string
default: buildOutputLocation
- name: targetPlatform
type: string
- name: hostArch
Expand All @@ -14,28 +11,31 @@ parameters:
- name: displayName
type: string
default: 'Run Tests'
# Parameters to pass to ctest to select the test(s) to run
- name: testSelection
type: string
steps:
- task: CmdLine@2
displayName: ${{ parameters.displayName }}
timeoutInMinutes: 20
condition: succeeded()
inputs:
workingDirectory: $(${{ parameters.buildOutputLocationVar }})
workingDirectory: $(buildOutputLocation)
script: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
ctest -V
ctest -V ${{ parameters.testSelection }}
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- task: PublishTestResults@2
displayName: 'Publish Tests'
timeoutInMinutes: 5
condition: succeededOrFailed()
inputs:
searchFolder: $(${{ parameters.buildOutputLocationVar }})
searchFolder: $(buildOutputLocation)
testResultsFormat: JUnit
testResultsFiles: '**/test-results.xml'
testRunTitle: 'test-${{ parameters.targetPlatform }}-$(System.JobPositionInPhase)'
- publish: $(${{ parameters.buildOutputLocationVar }})/test-results.xml
- publish: $(buildOutputLocation)/test-results.xml
artifact: '${{ parameters.targetPlatform }}-$(System.JobPositionInPhase)-xml-$(System.JobId)'
condition: failed()
displayName: 'Publish XML Artifact'
Loading