Skip to content

Commit fb8fde7

Browse files
Merge pull request #5648 from StephanTLavavej/merge-flat_map
Merge `main` to `feature/flat_map`
2 parents 5385a5a + 6cde930 commit fb8fde7

Some content is hidden

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

53 files changed

+313
-1965
lines changed

CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ cmake_minimum_required(VERSION 3.31.0)
66
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
77
project(msvc_standard_libraries LANGUAGES CXX)
88

9-
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.44.35209")
10-
message(FATAL_ERROR "The STL must be built with VS 2022 17.14.5 Preview 1 or later.")
9+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.44.35211")
10+
message(FATAL_ERROR "The STL must be built with VS 2022 17.14.8 Preview 1 or later.")
1111
endif()
1212

1313
include(CheckCXXSourceCompiles)
@@ -67,11 +67,6 @@ elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "x64")
6767
set(VCLIBS_I386_OR_AMD64 "amd64")
6868
set(VCLIBS_X86_OR_X64 "x64")
6969
add_compile_definitions(_AMD64_ _VCRT_WIN32_WINNT=0x0501 _STL_WIN32_WINNT=0x0501)
70-
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^(arm|armv7)$")
71-
set(VCLIBS_TARGET_ARCHITECTURE "arm")
72-
set(VCLIBS_I386_OR_AMD64 "arm")
73-
set(VCLIBS_X86_OR_X64 "arm")
74-
add_compile_definitions(_ARM_ _VCRT_WIN32_WINNT=0x0602 _STL_WIN32_WINNT=0x0602)
7570
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "arm64")
7671
set(VCLIBS_TARGET_ARCHITECTURE "arm64")
7772
set(VCLIBS_I386_OR_AMD64 "arm64")

CMakePresets.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,6 @@
4646
]
4747
}
4848
},
49-
{
50-
"name": "ARM",
51-
"inherits": "base",
52-
"description": "ARM Ninja Config",
53-
"architecture": {
54-
"strategy": "external",
55-
"value": "ARM"
56-
},
57-
"condition": {
58-
"type": "inList",
59-
"string": "$env{Platform}",
60-
"list": [
61-
"arm",
62-
""
63-
]
64-
},
65-
"cacheVariables": {
66-
"TESTS_BUILD_ONLY": true
67-
}
68-
},
6949
{
7050
"name": "ARM64",
7151
"inherits": "base",
@@ -119,11 +99,6 @@
11999
"configurePreset": "x64",
120100
"description": "Build x64 STL"
121101
},
122-
{
123-
"name": "ARM",
124-
"configurePreset": "ARM",
125-
"description": "Build ARM STL"
126-
},
127102
{
128103
"name": "ARM64",
129104
"configurePreset": "ARM64",

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ soon as possible.)
3939
and fully ported libcxx to run under [lit][] using the various configurations/compilers we test internally.
4040

4141
* Continuous Integration: **In progress.** We've set up Azure Pipelines to validate changes to the repository.
42-
Currently, it builds the STL (native desktop for x86, x64, ARM, and ARM64). Also, it strictly verifies that all of our
42+
Currently, it builds the STL (native desktop for x86, x64, and ARM64). Also, it strictly verifies that all of our
4343
files have been formatted with [clang-format][] and follow our other whitespace conventions.
4444

4545
* Contribution Guidelines: **Coming soon.** Working on the STL's code involves following many rules. We have codebase
@@ -141,12 +141,10 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
141141

142142
# How To Build With The Visual Studio IDE
143143

144-
1. Install Visual Studio 2022 17.14.5 Preview 1 or later.
144+
1. Install Visual Studio 2022 17.14.8 Preview 1 or later.
145145
* Select "Windows 11 SDK (10.0.26100.3916)" in the VS Installer.
146146
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
147147
if you would like to build the ARM64/ARM64EC target.
148-
* Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer
149-
if you would like to build the ARM target.
150148
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
151149
This will ensure that you're using supported versions of CMake and Ninja.
152150
* Otherwise, install [CMake][] 3.31.0 or later, and [Ninja][] 1.12.1 or later.
@@ -160,12 +158,10 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
160158

161159
# How To Build With A Native Tools Command Prompt
162160

163-
1. Install Visual Studio 2022 17.14.5 Preview 1 or later.
161+
1. Install Visual Studio 2022 17.14.8 Preview 1 or later.
164162
* Select "Windows 11 SDK (10.0.26100.3916)" in the VS Installer.
165163
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
166164
if you would like to build the ARM64/ARM64EC target.
167-
* Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer
168-
if you would like to build the ARM target.
169165
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
170166
This will ensure that you're using supported versions of CMake and Ninja.
171167
* Otherwise, install [CMake][] 3.31.0 or later, and [Ninja][] 1.12.1 or later.
@@ -188,14 +184,6 @@ To build the x64 target (recommended):
188184
3. `cmake --preset x64`
189185
4. `cmake --build --preset x64`
190186

191-
To build the ARM target:
192-
193-
1. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" x64_arm`
194-
* If you installed VS to a non-default location, change this path accordingly.
195-
2. Change directories to the previously cloned `STL` directory.
196-
3. `cmake --preset ARM`
197-
4. `cmake --build --preset ARM`
198-
199187
To build the ARM64 target:
200188

201189
1. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" x64_arm64`

azure-devops/asan-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ stages:
4545
asanBuild: true
4646
testTargets: STL-ASan-CI
4747

48-
# no coverage for ARM and ARM64
48+
# no coverage for ARM64

azure-devops/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
variables:
77
- name: poolName
8-
value: 'StlBuild-2025-06-10T1243-Pool'
8+
value: 'StlBuild-2025-07-09T1240-Pool'
99
readonly: true
1010
- name: poolDemands
1111
value: 'EnableSpotVM -equals false'

azure-devops/provision-image.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ $VisualStudioWorkloads = @(
2525
'Microsoft.VisualStudio.Component.VC.CMake.Project',
2626
'Microsoft.VisualStudio.Component.VC.CoreIde',
2727
'Microsoft.VisualStudio.Component.VC.Llvm.Clang',
28-
'Microsoft.VisualStudio.Component.VC.Tools.ARM',
2928
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
3029
'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC',
3130
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
@@ -40,10 +39,10 @@ foreach ($workload in $VisualStudioWorkloads) {
4039
}
4140

4241
# https://github.com/PowerShell/PowerShell/releases/latest
43-
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.1/PowerShell-7.5.1-win-x64.msi'
42+
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.2/PowerShell-7.5.2-win-x64.msi'
4443
$PowerShellArgs = @('/quiet', '/norestart')
4544

46-
$PythonUrl = 'https://www.python.org/ftp/python/3.13.4/python-3.13.4-amd64.exe'
45+
$PythonUrl = 'https://www.python.org/ftp/python/3.13.5/python-3.13.5-amd64.exe'
4746
$PythonArgs = @('/quiet', 'InstallAllUsers=1', 'PrependPath=1', 'CompileAll=1', 'Include_doc=0')
4847

4948
$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe'

azure-pipelines.yml

Lines changed: 1 addition & 32 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-
# Build STL targeting x86, x64, arm, arm64, arm64ec
4+
# Build STL targeting x86, x64, arm64, arm64ec
55

66
variables:
77
- template: azure-devops/config.yml
@@ -52,22 +52,6 @@ stages:
5252
numShards: 1
5353
skipTesting: true
5454

55-
# - stage: Early_Build_ARM
56-
# dependsOn: []
57-
# displayName: 'Early Build ARM'
58-
# pool:
59-
# name: ${{ variables.poolName }}
60-
# demands: ${{ variables.poolDemands }}
61-
# jobs:
62-
# - template: azure-devops/build-and-test.yml
63-
# parameters:
64-
# hostArch: x64
65-
# targetArch: arm
66-
# targetPlatform: arm
67-
# analyzeBuild: true
68-
# numShards: 1
69-
# skipTesting: true
70-
7155
- stage: Early_Build_ARM64
7256
dependsOn: []
7357
displayName: 'Early Build ARM64'
@@ -107,7 +91,6 @@ stages:
10791
- Code_Format
10892
- Early_Build_x64
10993
- Early_Build_x86
110-
# - Early_Build_ARM
11194
- Early_Build_ARM64
11295
- Early_Build_ARM64EC
11396
displayName: 'Build and Test x64'
@@ -134,20 +117,6 @@ stages:
134117
targetArch: x86
135118
targetPlatform: x86
136119

137-
# - stage: Build_And_Test_ARM
138-
# dependsOn: Build_And_Test_x64
139-
# displayName: 'Build and Test ARM'
140-
# pool:
141-
# name: ${{ variables.poolName }}
142-
# demands: ${{ variables.poolDemands }}
143-
# jobs:
144-
# - template: azure-devops/build-and-test.yml
145-
# parameters:
146-
# hostArch: x64
147-
# targetArch: arm
148-
# targetPlatform: arm
149-
# testsBuildOnly: true
150-
151120
- stage: Build_And_Test_ARM64
152121
dependsOn: Build_And_Test_x64
153122
displayName: 'Build and Test ARM64'

benchmarks/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ if(DEFINED STL_BINARY_DIR)
2323
set(VCLIBS_I386_OR_AMD64 "i386")
2424
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "x64")
2525
set(VCLIBS_I386_OR_AMD64 "amd64")
26-
elseif(VCLIBS_TARGET_ARCHITECTURE MATCHES "^(arm|armv7)$")
27-
set(VCLIBS_I386_OR_AMD64 "arm")
2826
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "arm64")
2927
set(VCLIBS_I386_OR_AMD64 "arm64")
3028
elseif(VCLIBS_TARGET_ARCHITECTURE STREQUAL "arm64ec")

benchmarks/src/includes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <cstdint>
88
#include <cstdlib>
99
#include <iostream>
10+
#include <limits>
1011
#include <random>
1112
#include <ranges>
1213
#include <type_traits>
@@ -74,9 +75,8 @@ void bm_includes(benchmark::State& state) {
7475

7576
if (!expected_match) {
7677
const T v = needle[needle_size / 2];
77-
const T r = static_cast<T>(static_cast<make_unsigned_t<T>>(v) + 1);
78+
const T r = v != numeric_limits<T>::max() ? v + 1 : v - 1;
7879
ranges::replace(hay, v, r);
79-
ranges::sort(hay);
8080
}
8181

8282
for (auto _ : state) {

stl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "")
421421
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "")
422422

423423
# Toolset options must appear before add_library() for the options to take effect.
424-
add_compile_definitions(_CRTBLD _VCRT_ALLOW_INTERNALS _HAS_OLD_IOSTREAMS_MEMBERS=1)
424+
add_compile_definitions(_CRTBLD _HAS_OLD_IOSTREAMS_MEMBERS=1)
425425

426426
# /Z7 for MSVC, /Zi for MASM
427427
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "Embedded")

0 commit comments

Comments
 (0)