Skip to content

Commit

Permalink
Toolset update: VS 2022 17.10 Preview 2, WinSDK 22621, CUDA 12.4.0 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej committed Mar 16, 2024
1 parent d6efe94 commit 4d088fc
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 37 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ project(msvc_standard_libraries LANGUAGES CXX)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles([=[
#include <sdkddkver.h>
static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN10_CO, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version.");
static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN10_NI, "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.22000.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.22621.0) 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 @@ -95,15 +95,15 @@ set(STL_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR
set(STL_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/bin/${VCLIBS_I386_OR_AMD64}")
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_CO)
_WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN10_NI)

if(STL_USE_ANALYZE)
# TRANSITION OS-40109504: Windows SDK: incorrect SAL annotations on functions the STL uses
# warning C6553: The annotation for function 'LCMapStringEx' on _Param_(9)
# does not apply to a value type.
# There's a bug in the declaration for LCMapStringEx - it applies _In_opt_ to an LPARAM.
# LPARAM is a LONG_PTR (intptr_t), and it's invalid to apply _In_opt_ to a non-pointer.
# As of the Windows 11 SDK (10.0.22000.0), there are 5 total occurrences of warning C6553 affecting the STL's build.
# As of the Windows 11 SDK (10.0.22621.0), there are 5 total occurrences of warning C6553 affecting the STL's build.
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/analyze:autolog-;/wd6553>")
endif()

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.10 Preview 1 or later.
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
1. Install Visual Studio 2022 17.10 Preview 2 or later.
* Select "Windows 11 SDK (10.0.22621.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.28.0 or later, and [Ninja][] 1.11.0 or later.
Expand All @@ -156,8 +156,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.10 Preview 1 or later.
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
1. Install Visual Studio 2022 17.10 Preview 2 or later.
* Select "Windows 11 SDK (10.0.22621.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.28.0 or later, and [Ninja][] 1.11.0 or later.
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-2024-02-13T1246-Pool'
value: 'StlBuild-2024-03-12T1202-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals true'
Expand Down
13 changes: 2 additions & 11 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ $Workloads = @(
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC',
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.Component.Windows11SDK.22000'
'Microsoft.VisualStudio.Component.Windows11SDK.22621'
)

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

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

$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Expand Down Expand Up @@ -302,15 +302,6 @@ Write-Host 'AdminUser password not supplied; assuming already running as AdminUs
# Print the Windows version, so we can verify whether Patch Tuesday has been picked up.
cmd /c ver

Write-Host 'Configuring AntiVirus exclusions...'
Add-MpPreference -ExclusionPath C:\agent
Add-MpPreference -ExclusionPath D:\
Add-MpPreference -ExclusionProcess ninja.exe
Add-MpPreference -ExclusionProcess clang-cl.exe
Add-MpPreference -ExclusionProcess cl.exe
Add-MpPreference -ExclusionProcess link.exe
Add-MpPreference -ExclusionProcess python.exe

InstallPython $PythonUrl
InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl
InstallCuda -Url $CudaUrl
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -2914,7 +2914,7 @@ struct _NODISCARD _Global_delete_guard {
}
};

_EXPORT_STD /* TRANSITION, VSO-1538698 */ template <class _Ty, class... _ArgTypes>
template <class _Ty, class... _ArgTypes>
_NODISCARD shared_ptr<_Ty> _Make_shared_unbounded_array(const size_t _Count, const _ArgTypes&... _Args) {
// make a shared_ptr to an unbounded array
static_assert(is_unbounded_array_v<_Ty>);
Expand Down Expand Up @@ -3022,7 +3022,7 @@ struct _Allocate_n_ptr {
_Allocate_n_ptr& operator=(const _Allocate_n_ptr&) = delete;
};

_EXPORT_STD /* TRANSITION, VSO-1538698 */ template <bool _IsForOverwrite, class _Ty, class _Alloc, class... _ArgTypes>
template <bool _IsForOverwrite, class _Ty, class _Alloc, class... _ArgTypes>
_NODISCARD shared_ptr<_Ty> _Allocate_shared_unbounded_array(
const _Alloc& _Al, const size_t _Count, const _ArgTypes&... _Args) {
// make a shared_ptr to an unbounded array
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/ostream
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ void _Vprint_nonunicode_impl(
_Ostr.setstate(_State);
}

_EXPORT_STD /* TRANSITION, VSO-1538698 */ template <class _Filebuf_type = filebuf>
template <class _Filebuf_type = filebuf>
ios_base::iostate _Print_noformat_unicode(ostream& _Ostr, const string_view _Str) {
// *LOCKED*
//
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ _NODISCARD constexpr const tuple_element_t<_Index, tuple<_Types...>>&& get(const
return static_cast<const _Ty&&>(static_cast<const _Ttype&>(_Tuple)._Myfirst._Val);
}

_EXPORT_STD /* TRANSITION, VSO-1538698 */ template <size_t _Index, class... _Types>
template <size_t _Index, class... _Types>
_NODISCARD constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept {
// used by pair's piecewise constructor
using _Ty = tuple_element_t<_Index, tuple<_Types...>>;
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/utility
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ struct tuple_element;
_EXPORT_STD template <size_t _Index, class _Tuple>
using tuple_element_t = typename tuple_element<_Index, _Tuple>::type;

_EXPORT_STD /* TRANSITION, VSO-1538698 */ template <size_t _Index, class... _Types>
template <size_t _Index, class... _Types>
_NODISCARD constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept;

_EXPORT_STD template <size_t _Index, class... _Types>
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/xhash
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ template <class _Hasher>
using _Is_hasher = negation<disjunction<is_integral<_Hasher>, _Is_allocator<_Hasher>>>;
#endif // _HAS_CXX17

_EXPORT_STD /* TRANSITION, VSO-1538698 */ template <class _Traits>
template <class _Traits>
_NODISCARD bool _Hash_equal(const _Hash<_Traits>& _Left, const _Hash<_Traits>& _Right) {
if (_Left.size() != _Right.size()) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/xlocale
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ __PURE_APPDOMAIN_GLOBAL locale::id codecvt<_Elem, _Byte, _Statype>::id;
#pragma clang diagnostic pop
#endif // defined(__clang__)

_EXPORT_STD /* TRANSITION, VSO-1538698 */ template <class _CvtTy, class _Byte, class _Statype>
template <class _CvtTy, class _Byte, class _Statype>
_NODISCARD int _Codecvt_do_length(
const _CvtTy& _Cvt, _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) {
// return p - _First1, for the largest value p in [_First1, _Last1] such that _Cvt will successfully convert
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@

#ifndef _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
#if defined(__CUDACC__) && defined(__CUDACC_VER_MAJOR__)
#if __CUDACC_VER_MAJOR__ < 11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ < 6)
_EMIT_STL_ERROR(STL1002, "Unexpected compiler version, expected CUDA 11.6 or newer.");
#if __CUDACC_VER_MAJOR__ < 12 || (__CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ < 4)
_EMIT_STL_ERROR(STL1002, "Unexpected compiler version, expected CUDA 12.4 or newer.");
#endif // ^^^ old CUDA ^^^
#elif defined(__EDG__)
// not attempting to detect __EDG_VERSION__ being less than expected
Expand Down
3 changes: 1 addition & 2 deletions tests/std/tests/GH_000639_nvcc_include_all/env.lst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# TRANSITION, CUDA 11.6 rejected VS 2022 17.10 as unsupported, so we need --allow-unsupported-compiler
PM_COMPILER="nvcc" PM_CL="--x cu -Xcompiler -Od,-EHsc,-nologo,-W4,-WX,-openmp --allow-unsupported-compiler"
PM_COMPILER="nvcc" PM_CL="--x cu -Xcompiler -Od,-EHsc,-nologo,-W4,-WX,-openmp"
RUNALL_CROSSLIST
PM_CL="-Xcompiler -MT"
PM_CL="--debug -Xcompiler -MTd"
2 changes: 0 additions & 2 deletions tests/std/tests/P0088R3_variant/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7674,10 +7674,8 @@ namespace msvc {
};

using VarTestConv = std::variant<convertible_to_immobile_one, convertible_to_immobile_other>;
#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10112408
assert(std::visit<R>(std::identity{}, VarTestConv{convertible_to_immobile_one{}}).x == 1729);
assert(std::visit<R>(std::identity{}, VarTestConv{convertible_to_immobile_other{}}).x == 1138);
#endif // TRANSITION, DevCom-10112408
auto immobile_converter = [](auto src) -> immobile_data { return src; };
assert(std::visit<R>(immobile_converter, VarTestConv{convertible_to_immobile_one{}}).x == 1729);
assert(std::visit<R>(immobile_converter, VarTestConv{convertible_to_immobile_other{}}).x == 1138);
Expand Down
4 changes: 0 additions & 4 deletions tests/std/tests/VSO_0000000_allocator_propagation/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ class nontrivial_pointer : private test_leak {
_CONSTEXPR20 ~nontrivial_pointer() = default;

_CONSTEXPR20 explicit operator bool() const noexcept {
#ifdef __EDG__ // TRANSITION, VSO-1888157
return static_cast<bool>(ptr);
#else // ^^^ workaround / no workaround vvv
return ptr != nullptr;
#endif // ^^^ no workaround ^^^
}
_CONSTEXPR20 add_lvalue_reference_t<T> operator*() const noexcept {
return *ptr;
Expand Down

0 comments on commit 4d088fc

Please sign in to comment.