Skip to content

Commit

Permalink
Toolset update: VS 2019 16.10 Preview 1 (microsoft#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej authored Mar 4, 2021
1 parent 108a112 commit ba47118
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 160 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# Ensure GitHub detects our C++ code as C++ code.
/stl/inc/** linguist-language=C++
/stl/src/** linguist-language=C++
*.h linguist-language=C++

# Ensure GitHub detects lit.cfg and lit.local.cfg as Python instead of HAProxy.
*.cfg linguist-language=Python

# Ensure GitHub detects our Perl legacy test harness code as Perl code instead of Raku.
*.pl linguist-language=Perl
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ project(msvc_standard_libraries LANGUAGES CXX)

find_package(Boost REQUIRED)

set(VCLIBS_MIN_BOOST_VERSION 1.74.0)
set(VCLIBS_MIN_BOOST_VERSION 1.75.0)
if("${Boost_VERSION}" VERSION_LESS "${VCLIBS_MIN_BOOST_VERSION}")
message(FATAL_ERROR "Detected Boost version is too old (older than ${VCLIBS_MIN_BOOST_VERSION}).")
endif()
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
The STL uses boost-math headers to provide P0226R1 Mathematical Special Functions. We recommend using [vcpkg][] to
acquire this dependency.

1. Install Visual Studio 2019 16.9 Preview 4 or later.
1. Install Visual Studio 2019 16.10 Preview 1 or later.
* 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.19 or later, and [Ninja][] 1.10.2 or later.
Expand All @@ -158,7 +158,7 @@ acquire this dependency.

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2019 16.9 Preview 4 or later.
1. Install Visual Studio 2019 16.10 Preview 1 or later.
* 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.19 or later, and [Ninja][] 1.10.2 or later.
Expand Down Expand Up @@ -234,7 +234,7 @@ C:\Users\username\Desktop>dumpbin /IMPORTS .\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.1 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
2. Acquire [Python][] 3.9.2 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
4 changes: 2 additions & 2 deletions azure-devops/create-vmss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ $ErrorActionPreference = 'Stop'
# https://aka.ms/azps-changewarnings
$Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true'

$Location = 'northeurope'
$Location = 'westus2'
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D32as_v4'
$VMSize = 'Standard_D32ds_v4'
$ProtoVMName = 'PROTOTYPE'
$LiveVMPrefix = 'BUILD'
$WindowsServerSku = '2019-Datacenter'
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 @@ -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.1.1/PowerShell-7.1.1-win-x64.zip'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.1.2/PowerShell-7.1.2-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down Expand Up @@ -139,7 +139,7 @@ $Workloads = @(
$ReleaseInPath = 'Preview'
$Sku = 'Enterprise'
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.9.1/python-3.9.1-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.9.2/python-3.9.2-amd64.exe'

# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
$WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854'
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ variables:
buildOutputLocation: 'D:\build'
vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg'

pool: 'StlBuild-2021-02-17'
pool: 'StlBuild-2021-03-02'

stages:
- stage: Code_Format
Expand Down
33 changes: 2 additions & 31 deletions stl/inc/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -1809,57 +1809,28 @@ inline constexpr bool is_nothrow_invocable_r_v =
#ifndef __clang__ // TRANSITION, LLVM-48860
// STRUCT TEMPLATE is_layout_compatible
template <class _Ty1, class _Ty2>
#ifdef _IS_LAYOUT_COMPATIBLE_SUPPORTED
struct is_layout_compatible : bool_constant<__is_layout_compatible(_Ty1, _Ty2)> {
#else // ^^^ _IS_LAYOUT_COMPATIBLE_SUPPORTED / !_IS_LAYOUT_COMPATIBLE_SUPPORTED vvv
struct is_layout_compatible : bool_constant<__builtin_is_layout_compatible(_Ty1, _Ty2)> {
#endif // _IS_LAYOUT_COMPATIBLE_SUPPORTED
};
struct is_layout_compatible : bool_constant<__is_layout_compatible(_Ty1, _Ty2)> {};

template <class _Ty1, class _Ty2>
#ifdef _IS_LAYOUT_COMPATIBLE_SUPPORTED
inline constexpr bool is_layout_compatible_v = __is_layout_compatible(_Ty1, _Ty2);
#else // ^^^ _IS_LAYOUT_COMPATIBLE_SUPPORTED / !_IS_LAYOUT_COMPATIBLE_SUPPORTED vvv
inline constexpr bool is_layout_compatible_v = __builtin_is_layout_compatible(_Ty1, _Ty2);
#endif // _IS_LAYOUT_COMPATIBLE_SUPPORTED

// STRUCT TEMPLATE is_pointer_interconvertible_base_of
template <class _Base, class _Derived>
struct is_pointer_interconvertible_base_of
#ifdef _IS_LAYOUT_COMPATIBLE_SUPPORTED
: bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)> {
};
#else // ^^^ _IS_LAYOUT_COMPATIBLE_SUPPORTED / !_IS_LAYOUT_COMPATIBLE_SUPPORTED vvv
: bool_constant<__builtin_is_pointer_interconvertible_base_of(_Base, _Derived)> {
};
#endif // _IS_LAYOUT_COMPATIBLE_SUPPORTED
struct is_pointer_interconvertible_base_of : bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)> {};

template <class _Base, class _Derived>
#ifdef _IS_LAYOUT_COMPATIBLE_SUPPORTED
inline constexpr bool is_pointer_interconvertible_base_of_v = __is_pointer_interconvertible_base_of(_Base, _Derived);
#else // ^^^ _IS_LAYOUT_COMPATIBLE_SUPPORTED / !_IS_LAYOUT_COMPATIBLE_SUPPORTED vvv
inline constexpr bool is_pointer_interconvertible_base_of_v = __builtin_is_pointer_interconvertible_base_of(
_Base, _Derived);
#endif // _IS_LAYOUT_COMPATIBLE_SUPPORTED

// FUNCTION TEMPLATE is_pointer_interconvertible_with_class
template <class _ClassTy, class _MemberTy>
_NODISCARD constexpr bool is_pointer_interconvertible_with_class(_MemberTy _ClassTy::*_Pm) noexcept {
#ifdef _IS_LAYOUT_COMPATIBLE_SUPPORTED
return __is_pointer_interconvertible_with_class(_ClassTy, _Pm);
#else // ^^^ _IS_LAYOUT_COMPATIBLE_SUPPORTED / !_IS_LAYOUT_COMPATIBLE_SUPPORTED vvv
return __builtin_is_pointer_interconvertible_with_class(_ClassTy, _Pm);
#endif // _IS_LAYOUT_COMPATIBLE_SUPPORTED
}

// FUNCTION TEMPLATE is_corresponding_member
template <class _ClassTy1, class _ClassTy2, class _MemberTy1, class _MemberTy2>
_NODISCARD constexpr bool is_corresponding_member(_MemberTy1 _ClassTy1::*_Pm1, _MemberTy2 _ClassTy2::*_Pm2) noexcept {
#ifdef _IS_LAYOUT_COMPATIBLE_SUPPORTED
return __is_corresponding_member(_ClassTy1, _ClassTy2, _Pm1, _Pm2);
#else // ^^^ _IS_LAYOUT_COMPATIBLE_SUPPORTED / !_IS_LAYOUT_COMPATIBLE_SUPPORTED vvv
return __builtin_is_corresponding_member(_ClassTy1, _ClassTy2, _Pm1, _Pm2);
#endif // _IS_LAYOUT_COMPATIBLE_SUPPORTED
}
#endif // __clang__
#endif // __EDG__
Expand Down
3 changes: 0 additions & 3 deletions stl/inc/xatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ _STL_DISABLE_CLANG_WARNINGS
#ifdef _M_CEE_PURE
#define _YIELD_PROCESSOR()
#else // ^^^ _M_CEE_PURE / !_M_CEE_PURE vvv
#if 1 // TRANSITION, VS 2019 16.10
extern "C" void _mm_pause(void);
#endif // TRANSITION, VS 2019 16.10
#define _YIELD_PROCESSOR() _mm_pause()
#endif // ^^^ !_M_CEE_PURE ^^^

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 @@ -531,8 +531,8 @@
#error STL1000: Unexpected compiler version, expected Clang 11.0.0 or newer.
#endif // ^^^ old Clang ^^^
#elif defined(_MSC_VER)
#if _MSC_VER < 1928 // Coarse-grained, not inspecting _MSC_FULL_VER
#error STL1001: Unexpected compiler version, expected MSVC 19.28 or newer.
#if _MSC_VER < 1929 // Coarse-grained, not inspecting _MSC_FULL_VER
#error STL1001: Unexpected compiler version, expected MSVC 19.29 or newer.
#endif // ^^^ old MSVC ^^^
#else // vvv other compilers vvv
// not attempting to detect other compilers
Expand Down
9 changes: 1 addition & 8 deletions stl/msbuild/stl_base/stl.files.settings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
$(CrtRoot)\github\stl\src\cthread.cpp;
$(CrtRoot)\github\stl\src\mutex.cpp;
$(CrtRoot)\github\stl\src\pplerror.cpp;
$(CrtRoot)\github\stl\src\ppltasks.cpp;
$(CrtRoot)\github\stl\src\taskscheduler.cpp;
$(CrtRoot)\github\stl\src\xnotify.cpp;
$(CrtRoot)\github\stl\src\xtime.cpp;
Expand Down Expand Up @@ -148,14 +149,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
<BuildAs>nativecpp</BuildAs>
</BuildFiles>

<BuildFiles Include="
$(CrtRoot)\github\stl\src\ppltasks.cpp;
">
<BuildAs>nativecpp</BuildAs>
<!-- ppltasks.cpp uses WRL, which is incompatible with /permissive- as of May 24, 2019 -->
<NeedsPermissiveMode>true</NeedsPermissiveMode>
</BuildFiles>

<BuildFiles Include="
$(CrtRoot)\github\stl\src\winapisupp.cpp;
">
Expand Down
18 changes: 0 additions & 18 deletions tests/libcxx/expected_results.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,6 @@ std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp:0 FAIL
std/containers/views/span.cons/ptr_len.pass.cpp:0 FAIL
std/containers/views/span.cons/ptr_ptr.pass.cpp:0 FAIL

# DevCom-1336816 "cl errors on constexpr array of std::string"
std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp:0 FAIL
std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp:0 FAIL

# DevCom-1336819 "cl constexpr temporary passing issue"
std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp:0 FAIL
std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp:0 FAIL

# VSO-1168723 "Implicit copy assignment incorrectly not constexpr when subobject has explicit constexpr copy constructor"
std/utilities/utility/pairs/pairs.pair/assign_pair.pass.cpp:0 FAIL
std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp:0 FAIL
Expand All @@ -375,16 +367,6 @@ std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp:0 FAIL
std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp:0 FAIL
std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp:0 FAIL

# VSO-1275530 "[constexpr] Temporaries created for functions do not have a ctor called (and have a redundant dtor)."
std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp:0 FAIL
std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp:0 FAIL
std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp:0 FAIL
std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp:0 FAIL
std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp:0 FAIL
std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp:0 FAIL
std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp:0 FAIL
std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp:0 FAIL


# *** CLANG COMPILER BUGS ***
# LLVM-33230 "Clang on Windows should define __STDCPP_THREADS__ to be 1"
Expand Down
18 changes: 0 additions & 18 deletions tests/libcxx/skipped_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,6 @@ utilities\meta\meta.unary\meta.unary.prop\is_constructible.pass.cpp
containers\views\span.cons\ptr_len.pass.cpp
containers\views\span.cons\ptr_ptr.pass.cpp

# DevCom-1336816 "cl errors on constexpr array of std::string"
numerics\numeric.ops\adjacent.difference\adjacent_difference_op.pass.cpp
numerics\numeric.ops\partial.sum\partial_sum_op.pass.cpp

# DevCom-1336819 "cl constexpr temporary passing issue"
numerics\numeric.ops\inner.product\inner_product_comp.pass.cpp
numerics\numeric.ops\accumulate\accumulate_op.pass.cpp

# VSO-1168723 "Implicit copy assignment incorrectly not constexpr when subobject has explicit constexpr copy constructor"
utilities\utility\pairs\pairs.pair\assign_pair.pass.cpp
utilities\utility\pairs\pairs.pair\assign_rv_pair.pass.cpp
Expand All @@ -375,16 +367,6 @@ utilities\utility\pairs\pairs.pair\assign_rv_pair_U_V.pass.cpp
algorithms\alg.sorting\alg.sort\partial.sort\partial_sort.pass.cpp
algorithms\alg.sorting\alg.sort\partial.sort\partial_sort_comp.pass.cpp

# VSO-1275530 "[constexpr] Temporaries created for functions do not have a ctor called (and have a redundant dtor)."
numerics\numeric.ops\exclusive.scan\exclusive_scan.pass.cpp
numerics\numeric.ops\exclusive.scan\exclusive_scan_init_op.pass.cpp
numerics\numeric.ops\inclusive.scan\inclusive_scan.pass.cpp
numerics\numeric.ops\inclusive.scan\inclusive_scan_op.pass.cpp
numerics\numeric.ops\inclusive.scan\inclusive_scan_op_init.pass.cpp
numerics\numeric.ops\transform.exclusive.scan\transform_exclusive_scan_init_bop_uop.pass.cpp
numerics\numeric.ops\transform.inclusive.scan\transform_inclusive_scan_bop_uop.pass.cpp
numerics\numeric.ops\transform.inclusive.scan\transform_inclusive_scan_bop_uop_init.pass.cpp


# *** CLANG COMPILER BUGS ***
# LLVM-33230 "Clang on Windows should define __STDCPP_THREADS__ to be 1"
Expand Down
6 changes: 3 additions & 3 deletions tests/std/tests/Dev11_0836436_get_time/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,15 @@ void test_990695() {
}

{
// Should fail if EOF while not parsing specifier (N4878 [locale.time.get.members]/8.4).
// Should fail if EOF while not parsing specifier (N4878 [locale.time.get.members]/8.3).
tm t{};
istringstream iss("4");
iss >> get_time(&t, "42");
assert(iss.rdstate() == (ios_base::eofbit | ios_base::failbit));
}

{
// Trailing % should not be treated as a literal (N4878 [locale.time.get.members]/8.4 again).
// Trailing % should not be treated as a literal (N4878 [locale.time.get.members]/8.4).
tm t{};
istringstream iss("%");
iss >> get_time(&t, "%");
Expand All @@ -520,7 +520,7 @@ void test_990695() {
}

{
// Literal match is case-insensitive.
// Literal match is case-insensitive (N4878 [locale.time.get.members]/8.6).
tm t{};
istringstream iss("aBc");
iss >> get_time(&t, "AbC");
Expand Down
4 changes: 1 addition & 3 deletions tests/std/tests/P0218R1_filesystem/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3908,9 +3908,7 @@ void run_interactive_tests(int argc, wchar_t* argv[]) {
// mode.
void test_devcom_953628() { // COMPILE-ONLY
struct S : wstring {};
#if defined(MSVC_INTERNAL_TESTING) || defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1270432
path{S{}};
#endif // defined(MSVC_INTERNAL_TESTING) || defined(__clang__) || defined(__EDG__)
}

int wmain(int argc, wchar_t* argv[]) {
Expand All @@ -3926,7 +3924,7 @@ int wmain(int argc, wchar_t* argv[]) {

if (argc > 1) {
run_interactive_tests(argc, argv);
return 0; // not a PM_ constant because the caller isn't run.pl here
return 0;
}

for (const auto& testCase : decompTestCases) {
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/P0784R7_library_machinery/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ _CONSTEXPR20_DYNALLOC bool test() {
}
#endif // __cpp_lib_concepts

#if defined(__cpp_constexpr_dynamic_alloc) && (defined(__clang__) || defined(__EDG__)) // TRANSITION, DevCom-1333853
#if defined(__cpp_constexpr_dynamic_alloc)
{ // _Uninitialized_move_unchecked
int_wrapper_move input[] = {1, 2, 3, 4};
int_wrapper_move output[4];
Expand All @@ -140,7 +140,7 @@ _CONSTEXPR20_DYNALLOC bool test() {
assert(equal(begin(input), end(input), begin(expected_after_move), end(expected_after_move)));
}
}
#endif // defined(__cpp_constexpr_dynamic_alloc) && (defined(__clang__) || defined(__EDG__))
#endif // defined(__cpp_constexpr_dynamic_alloc)
return true;
}

Expand Down
Loading

0 comments on commit ba47118

Please sign in to comment.