Skip to content

Commit 2144076

Browse files
davidbenagl
authored andcommitted
Remove VS 2015 support.
VS 2017 was released in March 2017, five years ago now. This means VS 2015 is now past our support window. This will make the unmarked and "vs2017" configs in CI/CQ do the same thing. I'll follow up with a separate CL in infra/config to switch the test VS 2019 instead. Update-Note: BoringSSL may no longer build with VS 2015. Consumers should upgrade to the latest Visual Studio release. VS 2017 or later is required. Change-Id: I477759deb95a27efe132de76d9ed103826110df0 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/52085 Reviewed-by: Bob Beck <[email protected]> Reviewed-by: Adam Langley <[email protected]>
1 parent b99b98b commit 2144076

File tree

8 files changed

+23
-40
lines changed

8 files changed

+23
-40
lines changed

BUILDING.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ most recent stable version of each tool.
3030
by CMake, it may be configured explicitly by setting
3131
`CMAKE_ASM_NASM_COMPILER`.
3232

33-
* C and C++ compilers with C++11 support are required. On Windows, MSVC 14
34-
(Visual Studio 2015) or later with Platform SDK 8.1 or later are supported,
35-
but newer versions are recommended. We will drop support for Visual Studio
36-
2015 in March 2022, five years after the release of Visual Studio 2017.
37-
Recent versions of GCC (6.1+) and Clang should work on non-Windows
38-
platforms, and maybe on Windows too.
33+
* C and C++ compilers with C++11 support are required. On Windows, MSVC from
34+
Visual Studio 2017 or later with Platform SDK 8.1 or later are supported,
35+
but newer versions are recommended. Recent versions of GCC (6.1+) and Clang
36+
should work on non-Windows platforms, and maybe on Windows too.
3937

4038
* The most recent stable version of [Go](https://golang.org/dl/) is required.
4139
Note Go is exempt from the five year support window. If not found by CMake,

crypto/abi_self_test.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ TEST(ABITest, SanityCheck) {
5858
#if defined(OPENSSL_WINDOWS)
5959
// The invalid epilog makes Windows believe the epilog starts later than it
6060
// actually does. As a result, immediately after the popq, it does not
61-
// realize the stack has been unwound and repeats the work.
62-
EXPECT_NONFATAL_FAILURE(CHECK_ABI_SEH(abi_test_bad_unwind_epilog),
63-
"unwound past starting frame");
61+
// realize the stack has been unwound and repeats the popq. This will result
62+
// in reading the wrong return address and fail to unwind. The exact failure
63+
// may vary depending on what was on the stack before.
64+
EXPECT_NONFATAL_FAILURE(CHECK_ABI_SEH(abi_test_bad_unwind_epilog), "");
6465
CHECK_ABI_NO_UNWIND(abi_test_bad_unwind_epilog);
6566
#endif // OPENSSL_WINDOWS
6667
}

include/openssl/span.h

+12-17
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ class Span : private internal::SpanBase<const T> {
9696
private:
9797
static const size_t npos = static_cast<size_t>(-1);
9898

99+
// Heuristically test whether C is a container type that can be converted into
100+
// a Span by checking for data() and size() member functions.
101+
//
102+
// TODO(davidben): Require C++14 support and switch to std::enable_if_t.
103+
// Perhaps even C++17 now?
104+
template <typename C>
105+
using EnableIfContainer = typename std::enable_if<
106+
std::is_convertible<decltype(std::declval<C>().data()), T *>::value &&
107+
std::is_integral<decltype(std::declval<C>().size())>::value>::type;
108+
99109
public:
100110
constexpr Span() : Span(nullptr, 0) {}
101111
constexpr Span(T *ptr, size_t len) : data_(ptr), size_(len) {}
@@ -104,27 +114,12 @@ class Span : private internal::SpanBase<const T> {
104114
constexpr Span(T (&array)[N]) : Span(array, N) {}
105115

106116
template <
107-
typename C,
108-
// TODO(davidben): Switch everything to std::enable_if_t when we remove
109-
// support for MSVC 2015. Although we could write our own enable_if_t and
110-
// MSVC 2015 has std::enable_if_t anyway, MSVC 2015's SFINAE
111-
// implementation is problematic and does not work below unless we write
112-
// the ::type at use.
113-
//
114-
// TODO(davidben): Move this and the identical copy below into an
115-
// EnableIfContainer alias when we drop MSVC 2015 support. MSVC 2015's
116-
// SFINAE support cannot handle type aliases.
117-
typename = typename std::enable_if<
118-
std::is_convertible<decltype(std::declval<C>().data()), T *>::value &&
119-
std::is_integral<decltype(std::declval<C>().size())>::value>::type,
117+
typename C, typename = EnableIfContainer<C>,
120118
typename = typename std::enable_if<std::is_const<T>::value, C>::type>
121119
Span(const C &container) : data_(container.data()), size_(container.size()) {}
122120

123121
template <
124-
typename C,
125-
typename = typename std::enable_if<
126-
std::is_convertible<decltype(std::declval<C>().data()), T *>::value &&
127-
std::is_integral<decltype(std::declval<C>().size())>::value>::type,
122+
typename C, typename = EnableIfContainer<C>,
128123
typename = typename std::enable_if<!std::is_const<T>::value, C>::type>
129124
explicit Span(C &container)
130125
: data_(container.data()), size_(container.size()) {}

ssl/handshake_server.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static bool is_probably_jdk11_with_tls13(const SSL_CLIENT_HELLO *client_hello) {
418418
// JDK 11 always sends extensions in a particular order.
419419
constexpr uint16_t kMaxFragmentLength = 0x0001;
420420
constexpr uint16_t kStatusRequestV2 = 0x0011;
421-
static CONSTEXPR_ARRAY struct {
421+
static constexpr struct {
422422
uint16_t id;
423423
bool required;
424424
} kJavaExtensions[] = {

ssl/internal.h

-8
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,6 @@ UniquePtr<T> MakeUnique(Args &&... args) {
245245
{ abort(); }
246246
#endif
247247

248-
// CONSTEXPR_ARRAY works around a VS 2015 bug where ranged for loops don't work
249-
// on constexpr arrays.
250-
#if defined(_MSC_VER) && !defined(__clang__) && _MSC_VER < 1910
251-
#define CONSTEXPR_ARRAY const
252-
#else
253-
#define CONSTEXPR_ARRAY constexpr
254-
#endif
255-
256248
// Array<T> is an owning array of elements of |T|.
257249
template <typename T>
258250
class Array {

ssl/ssl_key_share.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class CECPQ2KeyShare : public SSLKeyShare {
290290
HRSS_private_key hrss_private_key_;
291291
};
292292

293-
CONSTEXPR_ARRAY NamedGroup kNamedGroups[] = {
293+
constexpr NamedGroup kNamedGroups[] = {
294294
{NID_secp224r1, SSL_CURVE_SECP224R1, "P-224", "secp224r1"},
295295
{NID_X9_62_prime256v1, SSL_CURVE_SECP256R1, "P-256", "prime256v1"},
296296
{NID_secp384r1, SSL_CURVE_SECP384R1, "P-384", "secp384r1"},

util/bot/DEPS

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ vars = {
1919
'checkout_sde': False,
2020
'checkout_nasm': False,
2121
'checkout_libcxx': False,
22-
'vs_version': '2015',
22+
'vs_version': '2017',
2323

2424
# Run the following command to see the latest builds in CIPD:
2525
# cipd describe PACKAGE_NAME -version latest

util/bot/vs_toolchain.py

-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ def FindDepotTools():
6262
def _GetDesiredVsToolchainHashes(version):
6363
"""Load a list of SHA1s corresponding to the toolchains that we want installed
6464
to build with."""
65-
if version == '2015':
66-
# Update 3 final with 10.0.15063.468 SDK and no vctip.exe.
67-
return ['f53e4598951162bad6330f7a167486c7ae5db1e5']
6865
if version == '2017':
6966
# VS 2017 Update 9 (15.9.12) with 10.0.18362 SDK, 10.0.17763 version of
7067
# Debuggers, and 10.0.17134 version of d3dcompiler_47.dll, with ARM64

0 commit comments

Comments
 (0)