Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ cmake_minimum_required(VERSION 3.31.0)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.44.35207.1")
message(FATAL_ERROR "The STL must be built with VS 2022 17.14 Preview 7 or later.")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.44.35209")
message(FATAL_ERROR "The STL must be built with VS 2022 17.14.5 Preview 1 or later.")
endif()

include(CheckCXXSourceCompiles)
check_cxx_source_compiles([=[
#include <sdkddkver.h>
static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN10_NI, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version.");
static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN11_GE, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version.");
int main() {}
]=] WINDOWS_SDK_VERSION_CHECK)

if(NOT WINDOWS_SDK_VERSION_CHECK)
message(FATAL_ERROR "The STL must be built with the Windows 11 SDK (10.0.22621.0) or later. Make sure it's available by selecting it in the Individual Components tab of the VS Installer.")
message(FATAL_ERROR "The STL must be built with the Windows 11 SDK (10.0.26100.3916) or later. Make sure it's available by selecting it in the Individual Components tab of the VS Installer.")
endif()

if(NOT DEFINED VCLIBS_TARGET_ARCHITECTURE)
Expand Down Expand Up @@ -96,18 +96,21 @@ set(TOOLSET_LIB "${TOOLSET_ROOT_DIR}/lib/${VCLIBS_X86_OR_X64}")
set(STL_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR_AMD64}")
set(STL_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR_AMD64}")
set(STL_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/bin/${VCLIBS_I386_OR_AMD64}")

# TRANSITION, update internal crt-common.settings.targets, atlmfc.settings.targets, and fe-components.settings.targets
# from NTDDI_WIN10_NI to NTDDI_WIN11_GE when the internal WinSDK is updated.
add_compile_definitions(
_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH WIN32_LEAN_AND_MEAN STRICT _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS
_WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN10_NI)
_WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN11_GE)

if(STL_USE_ANALYZE)
# TRANSITION, Windows SDK 10.0.22621.0 emits
# TRANSITION, Windows SDK 10.0.26100.3916 emits
# "warning C6553: The annotation for function 'LCMapStringEx' on _Param_(9) does not apply to a value type."
# Reported as OS-40109504 "Windows SDK: incorrect SAL annotations on functions the STL uses".
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/analyze:autolog-;/wd6553>")

if(VCLIBS_TARGET_ARCHITECTURE STREQUAL "arm64ec")
# TRANSITION, Windows SDK 10.0.22621.0 emits
# TRANSITION, Windows SDK 10.0.26100.3916 emits
# "warning C28301: No annotations for first declaration of 'meow'"
# for various intrinsics when building for ARM64EC.
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/wd28301>")
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ 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.14 Preview 7 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
1. Install Visual Studio 2022 17.14.5 Preview 1 or later.
* Select "Windows 11 SDK (10.0.26100.3916)" in the VS Installer.
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
if you would like to build the ARM64/ARM64EC target.
* Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer
Expand All @@ -160,8 +160,8 @@ 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.14 Preview 7 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
1. Install Visual Studio 2022 17.14.5 Preview 1 or later.
* Select "Windows 11 SDK (10.0.26100.3916)" in the VS Installer.
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
if you would like to build the ARM64/ARM64EC target.
* Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

variables:
- name: poolName
value: 'StlBuild-2025-05-16T0735-Pool'
value: 'StlBuild-2025-06-10T1243-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals false'
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $VisualStudioWorkloads = @(
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC',
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.Component.Windows11SDK.22621'
'Microsoft.VisualStudio.Component.Windows11SDK.26100'
)

$VisualStudioUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
Expand All @@ -43,7 +43,7 @@ foreach ($workload in $VisualStudioWorkloads) {
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.1/PowerShell-7.5.1-win-x64.msi'
$PowerShellArgs = @('/quiet', '/norestart')

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

$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe'
Expand Down
58 changes: 29 additions & 29 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ stages:
numShards: 1
skipTesting: true

- stage: Early_Build_ARM
dependsOn: []
displayName: 'Early Build ARM'
pool:
name: ${{ variables.poolName }}
demands: ${{ variables.poolDemands }}
jobs:
- template: azure-devops/build-and-test.yml
parameters:
hostArch: x64
targetArch: arm
targetPlatform: arm
analyzeBuild: true
numShards: 1
skipTesting: true
# - stage: Early_Build_ARM
# dependsOn: []
# displayName: 'Early Build ARM'
# pool:
# name: ${{ variables.poolName }}
# demands: ${{ variables.poolDemands }}
# jobs:
# - template: azure-devops/build-and-test.yml
# parameters:
# hostArch: x64
# targetArch: arm
# targetPlatform: arm
# analyzeBuild: true
# numShards: 1
# skipTesting: true

- stage: Early_Build_ARM64
dependsOn: []
Expand Down Expand Up @@ -107,7 +107,7 @@ stages:
- Code_Format
- Early_Build_x64
- Early_Build_x86
- Early_Build_ARM
# - Early_Build_ARM
- Early_Build_ARM64
- Early_Build_ARM64EC
displayName: 'Build and Test x64'
Expand All @@ -134,19 +134,19 @@ stages:
targetArch: x86
targetPlatform: x86

- stage: Build_And_Test_ARM
dependsOn: Build_And_Test_x64
displayName: 'Build and Test ARM'
pool:
name: ${{ variables.poolName }}
demands: ${{ variables.poolDemands }}
jobs:
- template: azure-devops/build-and-test.yml
parameters:
hostArch: x64
targetArch: arm
targetPlatform: arm
testsBuildOnly: true
# - stage: Build_And_Test_ARM
# dependsOn: Build_And_Test_x64
# displayName: 'Build and Test ARM'
# pool:
# name: ${{ variables.poolName }}
# demands: ${{ variables.poolDemands }}
# jobs:
# - template: azure-devops/build-and-test.yml
# parameters:
# hostArch: x64
# targetArch: arm
# targetPlatform: arm
# testsBuildOnly: true

- stage: Build_And_Test_ARM64
dependsOn: Build_And_Test_x64
Expand Down
27 changes: 14 additions & 13 deletions stl/inc/__msvc_ranges_tuple_formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,20 @@ class basic_format_arg {
void(__cdecl* _Format)(basic_format_parse_context<_CharType>& _Parse_ctx, _Context& _Format_ctx, const void*);

template <class _Ty>
explicit handle(_Ty& _Val) noexcept
: _Ptr(_STD addressof(_Val)), _Format([](basic_format_parse_context<_CharType>& _Parse_ctx,
_Context& _Format_ctx, const void* _Ptr) _STATIC_LAMBDA {
using _Td = remove_const_t<_Ty>;
// doesn't drop const-qualifier per an unnumbered LWG issue
using _Tq = conditional_t<_Formattable_with<const _Ty, _Context>, const _Ty, _Ty>;
_STL_INTERNAL_STATIC_ASSERT(_Formattable_with<_Tq, _Context>);

typename _Context::template formatter_type<_Td> _Formatter;
_Parse_ctx.advance_to(_Formatter.parse(_Parse_ctx));
_Format_ctx.advance_to(
_Formatter.format(*const_cast<_Tq*>(static_cast<const _Td*>(_Ptr)), _Format_ctx));
}) {}
static void __cdecl _Handle_format(
basic_format_parse_context<_CharType>& _Parse_ctx, _Context& _Format_ctx, const void* _Ptr) {
using _Td = remove_const_t<_Ty>;
// doesn't drop const-qualifier per an unnumbered LWG issue
using _Tq = conditional_t<_Formattable_with<const _Ty, _Context>, const _Ty, _Ty>;
_STL_INTERNAL_STATIC_ASSERT(_Formattable_with<_Tq, _Context>);

typename _Context::template formatter_type<_Td> _Formatter;
_Parse_ctx.advance_to(_Formatter.parse(_Parse_ctx));
_Format_ctx.advance_to(_Formatter.format(*const_cast<_Tq*>(static_cast<const _Td*>(_Ptr)), _Format_ctx));
}

template <class _Ty>
explicit handle(_Ty& _Val) noexcept : _Ptr(_STD addressof(_Val)), _Format(_Handle_format<_Ty>) {}

public:
void format(basic_format_parse_context<_CharType>& _Parse_ctx, _Context& _Format_ctx) const {
Expand Down
8 changes: 2 additions & 6 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -2008,15 +2008,11 @@ compiler option, or define _ALLOW_RTCc_IN_STL to suppress this error.
#define _STATIC_CALL_OPERATOR
#define _CONST_CALL_OPERATOR const
#define _STATIC_LAMBDA
#elif defined(__clang__) || defined(__EDG__) // no workaround
#else // ^^^ workaround / no workaround vvv
#define _STATIC_CALL_OPERATOR static
#define _CONST_CALL_OPERATOR
#define _STATIC_LAMBDA static
#else // TRANSITION, VSO-2383148, fixed in VS 2022 17.14 Preview 3
#define _STATIC_CALL_OPERATOR static
#define _CONST_CALL_OPERATOR
#define _STATIC_LAMBDA
#endif // ^^^ workaround ^^^
#endif // ^^^ no workaround ^^^

#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize MSVC __restrict; CUDA __restrict__ is not usable in C++
#define _RESTRICT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,10 @@
// Also test GH-2645: <yvals_core.h>: Conformance issue on [[msvc::known_semantics]]
#define msvc 1
#define known_semantics 2

#ifndef _M_ARM64EC // TRANSITION, Windows SDK 10.0.22621.0 uses '#pragma intrinsic(fabsf)' for ARM64EC.
// This use is no longer present in Windows SDK 10.0.26100.0.
#define intrinsic 3
#endif // ^^^ no workaround ^^^

#define lifetimebound 4
#define noop_dtor 5
#define empty_bases 6
#define intrinsic 3
#define lifetimebound 4
#define noop_dtor 5
#define empty_bases 6

#include <__msvc_all_public_headers.hpp>

Expand All @@ -53,11 +48,9 @@
#error bad macro expansion
#endif // known_semantics != 2

#ifndef _M_ARM64EC // TRANSITION, Windows SDK 10.0.22621.0
#if intrinsic != 3
#error bad macro expansion
#endif // intrinsic != 3
#endif // ^^^ no workaround ^^^

#if lifetimebound != 4
#error bad macro expansion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ constexpr bool test() {
ASSERT(!is_corresponding_member(&S5::v1, &S6::v2));
ASSERT(!is_corresponding_member(&S5::v2, &S6::v1));
ASSERT(!is_corresponding_member(&S5::v3, &S6::v3));
#ifndef _M_CEE // TRANSITION, VSO-2417635
ASSERT(!is_corresponding_member<NS, NS>(&NS::v1, &NS::w1));
#endif // ^^^ no workaround ^^^
ASSERT(!is_corresponding_member(&S7::f1, &S7::f1));
ASSERT(!is_corresponding_member(static_cast<int S1::*>(nullptr), static_cast<int S2::*>(nullptr)));
ASSERT(!is_corresponding_member(&S1::v1, static_cast<int S2::*>(nullptr)));
Expand Down Expand Up @@ -236,9 +234,7 @@ constexpr bool test() {
ASSERT(is_pointer_interconvertible_with_class(&U::v2));

ASSERT(!is_pointer_interconvertible_with_class<NS>(&NS::a));
#ifndef _M_CEE // TRANSITION, VSO-2417635
ASSERT(!is_pointer_interconvertible_with_class<NS>(&NS::b));
#endif // ^^^ no workaround ^^^
ASSERT(!is_pointer_interconvertible_with_class(&C::f1));
ASSERT(!is_pointer_interconvertible_with_class(static_cast<int A::*>(nullptr)));
}
Expand Down
9 changes: 2 additions & 7 deletions tests/std/tests/P0896R4_P1614R2_comparisons/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,8 @@ constexpr void ordering_test_cases() {

derived const some_deriveds[2] = {};
test_strongly_ordered(&some_deriveds[0], &some_deriveds[1]);
#if !defined(__clang__) && !defined(__EDG__) // TRANSITION, VSO-1168721
if (!std::is_constant_evaluated())
#endif // ^^^ workaround ^^^
{
test_strongly_ordered(static_cast<base const*>(&some_deriveds[0]), &some_deriveds[1]);
test_strongly_ordered(&some_deriveds[0], static_cast<base const*>(&some_deriveds[1]));
}
test_strongly_ordered(static_cast<base const*>(&some_deriveds[0]), &some_deriveds[1]);
test_strongly_ordered(&some_deriveds[0], static_cast<base const*>(&some_deriveds[1]));

if (!std::is_constant_evaluated()) {
test_strongly_ordered(&some_ints[0], static_cast<void const*>(&some_ints[1]));
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/P1208R6_source_location/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ constexpr void different_constructor_test() {
assert(x.loc.column() == 5);
#endif // ^^^ C1XX ^^^
#if _USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION
#ifdef __EDG__ // TRANSITION, EDG is changing to match C1XX's output
assert(x.loc.function_name() == THISCALL_OR_CDECL " s::s(int)"sv || x.loc.function_name() == "s::s(int)"sv);
#ifdef __EDG__ // TRANSITION, EDG is changing to almost match C1XX's output
assert(x.loc.function_name() == "__cdecl s::s(int)"sv || x.loc.function_name() == "s::s(int)"sv);
#else // ^^^ workaround / no workaround vvv
assert(x.loc.function_name() == THISCALL_OR_CDECL " s::s(int)"sv);
#endif // ^^^ no workaround ^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
// This EXCLUDES the <cmeow> headers in:
// [tab:headers.cpp.c]: "Table 22: C++ headers for C library facilities"

// TRANSITION, Windows SDK 10.0.22621.0 causes this test to fail for ARM64EC with:
// "error LNK2019: unresolved external symbol fabsf referenced in function #fabsf$exit_thunk (EC Symbol)"
// It passes when built with Windows SDK 10.0.26100.0.
// UNSUPPORTED: arm64ec

import <algorithm>;
import <any>;
import <array>;
Expand Down
5 changes: 0 additions & 5 deletions tests/std/tests/P2465R3_standard_library_modules/test.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

// TRANSITION, Windows SDK 10.0.22621.0 causes this test to fail for ARM64EC with:
// "error LNK2019: unresolved external symbol fabsf referenced in function #fabsf$exit_thunk (EC Symbol)"
// It passes when built with Windows SDK 10.0.26100.0.
// UNSUPPORTED: arm64ec

import std;

#include <assert.h> // intentionally not <cassert>
Expand Down
7 changes: 0 additions & 7 deletions tests/std/tests/VSO_1775715_user_defined_modules/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@

// Note: To properly test the fix for VSO-1775715, don't include any headers here.

// TRANSITION, Windows SDK 10.0.22621.0 causes this test to fail for ARM64EC with:
// "error LNK2019: unresolved external symbol fabsf referenced in function #fabsf$exit_thunk (EC Symbol)"
// Windows SDK 10.0.26100.0 will avoid that error, but we'll need to investigate why user.ixx emits:
// "error C2678: binary '==': no operator found which takes a left-hand operand of type 'const std::string'
// (or there is no acceptable conversion)"
// UNSUPPORTED: arm64ec

import User;

int main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/stl/test/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def _handleEnvlst(self, litConfig):
self.compileFlags.append('/arm64EC')
self.linkFlags.append('/machine:arm64ec')

# TRANSITION, Windows SDK 10.0.22621.0 emits
# TRANSITION, Windows SDK 10.0.26100.3916 emits
# "warning C28301: No annotations for first declaration of 'meow'"
# for various intrinsics when building for ARM64EC.
self.compileFlags.append('/wd28301')
Expand Down