Skip to content

Commit 9a9820d

Browse files
Toolset update: VS 2022 17.0 Preview 2 (#2064)
1 parent 280347a commit 9a9820d

File tree

91 files changed

+1503
-1523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1503
-1523
lines changed

.clang-format

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation.
22
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

4-
# https://releases.llvm.org/11.0.0/tools/clang/docs/ClangFormatStyleOptions.html
4+
# https://releases.llvm.org/12.0.0/tools/clang/docs/ClangFormatStyleOptions.html
55

66
---
77
# Language: Cpp
@@ -10,12 +10,12 @@ BasedOnStyle: LLVM
1010
AccessModifierOffset: -4
1111
# AlignAfterOpenBracket: Align
1212
AlignAfterOpenBracket: DontAlign
13-
# AlignConsecutiveMacros: false
14-
AlignConsecutiveMacros: true
15-
# AlignConsecutiveAssignments: false
16-
AlignConsecutiveAssignments: true
17-
# AlignConsecutiveBitFields: false
18-
# AlignConsecutiveDeclarations: false
13+
# AlignConsecutiveMacros: None
14+
AlignConsecutiveMacros: Consecutive
15+
# AlignConsecutiveAssignments: None
16+
AlignConsecutiveAssignments: Consecutive
17+
# AlignConsecutiveBitFields: None
18+
# AlignConsecutiveDeclarations: None
1919
# AlignEscapedNewlines: Right
2020
AlignEscapedNewlines: Left
2121
# AlignOperands: Align
@@ -38,6 +38,8 @@ AllowShortFunctionsOnASingleLine: Empty
3838
# AlwaysBreakBeforeMultilineStrings: false
3939
# AlwaysBreakTemplateDeclarations: MultiLine
4040
AlwaysBreakTemplateDeclarations: Yes
41+
# AttributeMacros:
42+
# - __capability
4143
# BinPackArguments: true
4244
# BinPackParameters: true
4345
# BraceWrapping:
@@ -61,6 +63,7 @@ AlwaysBreakTemplateDeclarations: Yes
6163
# SplitEmptyNamespace: true
6264
# BreakBeforeBinaryOperators: None
6365
BreakBeforeBinaryOperators: NonAssignment
66+
# BreakBeforeConceptDeclarations: true
6467
# BreakBeforeBraces: Attach
6568
# BreakBeforeInheritanceComma: false
6669
# BreakInheritanceList: BeforeColon
@@ -81,24 +84,30 @@ ColumnLimit: 120
8184
DeriveLineEnding: false
8285
# DerivePointerAlignment: false
8386
# DisableFormat: false
87+
# EmptyLineBeforeAccessModifier: LogicalBlock
8488
# ExperimentalAutoDetectBinPacking: false
8589
# FixNamespaceComments: true
8690
# ForEachMacros:
8791
# - foreach
8892
# - Q_FOREACH
8993
# - BOOST_FOREACH
94+
# StatementAttributeLikeMacros:
95+
# - Q_EMIT
9096
# IncludeBlocks: Preserve
9197
IncludeBlocks: Regroup
9298
# IncludeCategories:
9399
# - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
94100
# Priority: 2
95101
# SortPriority: 0
102+
# CaseSensitive: false
96103
# - Regex: '^(<|"(gtest|gmock|isl|json)/)'
97104
# Priority: 3
98105
# SortPriority: 0
106+
# CaseSensitive: false
99107
# - Regex: '.*'
100108
# Priority: 1
101109
# SortPriority: 0
110+
# CaseSensitive: false
102111
IncludeCategories:
103112
- Regex: '^<yvals(_core)?\.h>$'
104113
Priority: 1
@@ -122,6 +131,8 @@ IndentCaseBlocks: true
122131
# IndentGotoLabels: true
123132
# IndentPPDirectives: None
124133
# IndentExternBlock: AfterExternBlock
134+
# IndentRequires: false
135+
IndentRequires: true
125136
# IndentWidth: 2
126137
IndentWidth: 4
127138
# IndentWrappedFunctionNames: false
@@ -150,20 +161,24 @@ NamespaceIndentation: All
150161
# PenaltyBreakTemplateDeclaration: 10
151162
# PenaltyExcessCharacter: 1000000
152163
# PenaltyReturnTypeOnItsOwnLine: 60
164+
# PenaltyIndentedWhitespace: 0
153165
# PointerAlignment: Right
154166
PointerAlignment: Left
155167
# ReflowComments: true
156168
# SortIncludes: true
169+
# SortJavaStaticImport: Before
157170
# SortUsingDeclarations: true
158171
# SpaceAfterCStyleCast: false
159172
SpaceAfterCStyleCast: true
160173
# SpaceAfterLogicalNot: false
161174
# SpaceAfterTemplateKeyword: true
162175
# SpaceBeforeAssignmentOperators: true
176+
# SpaceBeforeCaseColon: false
163177
# SpaceBeforeCpp11BracedList: false
164178
# SpaceBeforeCtorInitializerColon: true
165179
# SpaceBeforeInheritanceColon: true
166180
# SpaceBeforeParens: ControlStatements
181+
# SpaceAroundPointerQualifiers: Default
167182
# SpaceBeforeRangeBasedForLoopColon: true
168183
# SpaceInEmptyBlock: false
169184
# SpaceInEmptyParentheses: false
@@ -175,6 +190,7 @@ SpaceAfterCStyleCast: true
175190
# SpacesInParentheses: false
176191
# SpacesInSquareBrackets: false
177192
# SpaceBeforeSquareBrackets: false
193+
# BitFieldColonSpacing: Both
178194
# Standard: Latest
179195
# StatementMacros:
180196
# - Q_UNUSED
@@ -198,4 +214,6 @@ UseCRLF: true
198214
# - STRINGIZE
199215
# - PP_STRINGIZE
200216
# - BOOST_PP_STRINGIZE
217+
# - NS_SWIFT_NAME
218+
# - CF_SWIFT_NAME
201219
...

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ International Standard. The terms Working Draft (WD) and Working Paper (WP) are
6262
informally refer to these drafts as "the Standard" while being aware of the difference. (There are other relevant
6363
Standards; for example, supporting `/std:c++14` and `/std:c++17` involves understanding how the C++14 and C++17
6464
Standards differ from the Working Paper, and we often need to refer to the C Standard Library and ECMAScript regular
65-
expression specifications.) We're currently prioritizing C++20 features before starting any work on C++23.
65+
expression specifications.)
6666

6767
Our primary goals are conformance, performance, usability, and compatibility.
6868

@@ -79,8 +79,8 @@ significantly more complicated and fragile. That is, there's a "complexity budge
7979
debugging checks. For example, we've extensively marked the STL with `[[nodiscard]]` attributes because this helps
8080
programmers avoid bugs.
8181

82-
* Compatibility: This includes binary compatibility and source compatibility. We're keeping VS 2019 binary-compatible
83-
with VS 2017 and VS 2015, which restricts what we can change in VS 2019 updates. (We've found that significant changes
82+
* Compatibility: This includes binary compatibility and source compatibility. We're keeping VS 2022 binary-compatible
83+
with VS 2015/2017/2019, which restricts what we can change in VS 2022 updates. (We've found that significant changes
8484
are possible even though other changes are impossible, which we'll be documenting in our Contribution Guidelines soon.)
8585
While there are a few exceptions to this rule (e.g. if a feature is added to the Working Paper, we implement it, and
8686
then the feature is significantly changed before the International Standard is finalized, we reserve the right to break
@@ -143,7 +143,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
143143
The STL uses boost-math headers to provide P0226R1 Mathematical Special Functions. We recommend using [vcpkg][] to
144144
acquire this dependency.
145145

146-
1. Install Visual Studio 2019 16.11 Preview 2 or later.
146+
1. Install Visual Studio 2022 17.0 Preview 2 or later.
147147
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
148148
This will ensure that you're using supported versions of CMake and Ninja.
149149
* Otherwise, install [CMake][] 3.20 or later, and [Ninja][] 1.10.2 or later.
@@ -158,7 +158,7 @@ acquire this dependency.
158158

159159
# How To Build With A Native Tools Command Prompt
160160

161-
1. Install Visual Studio 2019 16.11 Preview 2 or later.
161+
1. Install Visual Studio 2022 17.0 Preview 2 or later.
162162
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
163163
This will ensure that you're using supported versions of CMake and Ninja.
164164
* Otherwise, install [CMake][] 3.20 or later, and [Ninja][] 1.10.2 or later.
@@ -172,14 +172,14 @@ acquire this dependency.
172172

173173
To build the x86 target:
174174

175-
1. Open an "x86 Native Tools Command Prompt for VS 2019 Preview".
175+
1. Open an "x86 Native Tools Command Prompt for VS 2022 Preview".
176176
2. Change directories to the previously cloned `STL` directory.
177177
3. `cmake -G Ninja -S . -B out\build\x86`
178178
4. `ninja -C out\build\x86`
179179

180-
To build the x64 target:
180+
To build the x64 target (recommended):
181181

182-
1. Open an "x64 Native Tools Command Prompt for VS 2019 Preview".
182+
1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview".
183183
2. Change directories to the previously cloned `STL` directory.
184184
3. `cmake -G Ninja -S . -B out\build\x64`
185185
4. `ninja -C out\build\x64`
@@ -205,7 +205,7 @@ your .exe would "win" over the versions in System32.
205205
The compiler looks for include directories according to the `INCLUDE` environment variable, and the linker looks for
206206
import library directories according to the `LIB` environment variable, and the Windows loader will (eventually) look
207207
for DLL dependencies according to directories in the `PATH` environment variable. From an
208-
"x64 Native Tools Command Prompt for VS 2019 Preview":
208+
"x64 Native Tools Command Prompt for VS 2022 Preview":
209209

210210
```
211211
C:\Users\username\Desktop>set INCLUDE=C:\Dev\STL\out\build\x64\out\inc;%INCLUDE%
@@ -234,7 +234,7 @@ C:\Users\username\Desktop>dumpbin /IMPORTS .\example.exe | findstr msvcp
234234
# How To Run The Tests With A Native Tools Command Prompt
235235

236236
1. Follow either [How To Build With A Native Tools Command Prompt][] or [How To Build With The Visual Studio IDE][].
237-
2. Acquire [Python][] 3.9.5 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
237+
2. Acquire [Python][] 3.9.6 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
238238
3. Have LLVM's `bin` directory on the `PATH` (so `clang-cl.exe` is available).
239239
* We recommend selecting "C++ Clang tools for Windows" in the VS Installer. This will automatically add LLVM to the
240240
`PATH` of the x86 and x64 Native Tools Command Prompts, and will ensure that you're using a supported version.
@@ -354,7 +354,7 @@ those features first the tests will begin passing unexpectedly for us and return
354354
this it is necessary to add a `PASS` entry to the `expected_results.txt` of the testsuite in question.
355355

356356
The `UNSUPPORTED` result code means that the requirements for a test are not met and so it will not be run. Currently
357-
all tests which use the `/clr` or `/clr:pure` options are unsupported. Also, the `/BE` option is unsupported for x64.
357+
all tests which use the `/clr` or `/clr:pure` options are unsupported. Also, the `/BE` option is unsupported for x86.
358358

359359
The `SKIPPED` result code indicates that a given test was explicitly skipped by adding a `SKIPPED` entry to the
360360
`expected_results.txt`. A test may be skipped for a number of reasons, which include, but are not limited to:
@@ -404,8 +404,8 @@ set PATH=C:\STL\out\build\x64\out\bin\amd64;%PATH%
404404

405405
### Modify The Visualizer
406406

407-
To modify how components are visualized in the debugger edit the file `stl\debugger\STL.natvis`. For more information on
408-
how to modify this file check the [natvis documentation][].
407+
To modify how components are visualized in the debugger, edit the file `stl\debugger\STL.natvis`. For more information
408+
on how to modify this file, check the [natvis documentation][].
409409

410410
### Test Your Changes
411411

azure-devops/cmake-configure-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ steps:
3030
if exist "$(${{ parameters.buildOutputLocationVar }})" (
3131
rmdir /S /Q "$(${{ parameters.buildOutputLocationVar }})"
3232
)
33-
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat" ^
33+
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
3434
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
3535
cmake ${{ parameters.cmakeAdditionalFlags}} -G Ninja ^
3636
-DCMAKE_TOOLCHAIN_FILE=$(${{ parameters.vcpkgLocationVar }})\scripts\buildsystems\vcpkg.cmake ^
@@ -44,7 +44,7 @@ steps:
4444
timeoutInMinutes: 2
4545
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
4646
- script: |
47-
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat" ^
47+
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
4848
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
4949
cmake --build $(${{ parameters.buildOutputLocationVar }})
5050
displayName: 'Build the STL'

azure-devops/enforce-clang-format.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:: Copyright (c) Microsoft Corporation.
22
:: SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3-
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat" ^
3+
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
44
-host_arch=amd64 -arch=amd64 -no_logo
55
"%1" "clang-format.exe -style=file -i" ^
66
stl/inc ^

azure-devops/provision-image.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,14 @@ $Workloads = @(
133133
'Microsoft.VisualStudio.Component.VC.Tools.ARM',
134134
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
135135
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
136+
# TRANSITION, LLVM-51128 (Clang 12 targeting ARM64 is incompatible with WinSDK 10.0.20348.0)
136137
'Microsoft.VisualStudio.Component.Windows10SDK.19041'
137138
)
138139

139140
$ReleaseInPath = 'Preview'
140141
$Sku = 'Enterprise'
141-
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/pre/vs_enterprise.exe'
142-
$PythonUrl = 'https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe'
142+
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
143+
$PythonUrl = 'https://www.python.org/ftp/python/3.9.6/python-3.9.6-amd64.exe'
143144

144145
# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
145146
$WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854'

azure-devops/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ steps:
2525
inputs:
2626
workingDirectory: $(${{ parameters.buildOutputLocationVar }})
2727
script: |
28-
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat" ^
28+
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
2929
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
3030
ctest -V
3131
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }

azure-pipelines.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ variables:
88
buildOutputLocation: 'D:\build'
99
vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg'
1010

11-
pool: 'StlBuild-2021-06-15'
11+
pool: 'StlBuild-2021-07-18'
1212

1313
stages:
1414
- stage: Code_Format
@@ -33,7 +33,7 @@ stages:
3333
if exist "$(buildOutputLocation)" (
3434
rmdir /S /Q "$(buildOutputLocation)"
3535
)
36-
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat" ^
36+
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
3737
-host_arch=amd64 -arch=amd64 -no_logo
3838
cmake -G Ninja -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release ^
3939
-S $(Build.SourcesDirectory)\tools -B $(buildOutputLocation)
@@ -59,26 +59,26 @@ stages:
5959
arguments: '$(buildOutputLocation)/validate/validate.exe'
6060
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
6161

62-
- stage: Build_And_Test_x86
62+
- stage: Build_And_Test_x64
6363
dependsOn: Code_Format
6464
displayName: 'Build and Test'
6565
jobs:
6666
- template: azure-devops/native-build-test.yml
6767
parameters:
68-
targetPlatform: x86
69-
vsDevCmdArch: x86
68+
targetPlatform: x64
69+
vsDevCmdArch: amd64
7070

71-
- stage: Build_And_Test_x64
72-
dependsOn: Build_And_Test_x86
71+
- stage: Build_And_Test_x86
72+
dependsOn: Build_And_Test_x64
7373
displayName: 'Build and Test'
7474
jobs:
7575
- template: azure-devops/native-build-test.yml
7676
parameters:
77-
targetPlatform: x64
78-
vsDevCmdArch: amd64
77+
targetPlatform: x86
78+
vsDevCmdArch: x86
7979

8080
- stage: Build_ARM
81-
dependsOn: Build_And_Test_x86
81+
dependsOn: Build_And_Test_x64
8282
displayName: 'Build'
8383
jobs:
8484
- template: azure-devops/cross-build.yml
@@ -87,7 +87,7 @@ stages:
8787
vsDevCmdArch: arm
8888

8989
- stage: Build_ARM64
90-
dependsOn: Build_And_Test_x86
90+
dependsOn: Build_And_Test_x64
9191
displayName: 'Build'
9292
jobs:
9393
- template: azure-devops/cross-build.yml

0 commit comments

Comments
 (0)