* fix #7548 by updating to v142 toolset (again) * small note * it's a compiler bug. let's just try * you get a pass vc++... THIS TIME * should no longer need v141 toolset!
This commit is contained in:
parent
511761627a
commit
915cc74df8
|
|
@ -12,9 +12,4 @@
|
||||||
<_ProjectExtensionsWereImported>true</_ProjectExtensionsWereImported>
|
<_ProjectExtensionsWereImported>true</_ProjectExtensionsWereImported>
|
||||||
<WixTargetsPath>$(WixInstallPath)\wix2010.targets</WixTargetsPath>
|
<WixTargetsPath>$(WixInstallPath)\wix2010.targets</WixTargetsPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Workaround https://developercommunity.visualstudio.com/content/problem/434385/vs2019-preview-2-targetframeworkversion-or-platfor.html -->
|
|
||||||
<PropertyGroup>
|
|
||||||
<VCToolsVersion Condition = "'$(VCToolsVersion)' == ''" >14.16.27023</VCToolsVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@
|
||||||
"Microsoft.VisualStudio.Component.NuGet.BuildTools",
|
"Microsoft.VisualStudio.Component.NuGet.BuildTools",
|
||||||
"Microsoft.VisualStudio.Component.VC.ATL",
|
"Microsoft.VisualStudio.Component.VC.ATL",
|
||||||
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
||||||
"Microsoft.VisualStudio.Component.VC.v141.ATL",
|
|
||||||
"Microsoft.VisualStudio.Component.VC.v141.x86.x64",
|
|
||||||
"Microsoft.VisualStudio.Component.Windows10SDK.17134",
|
"Microsoft.VisualStudio.Component.Windows10SDK.17134",
|
||||||
"Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools",
|
"Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools",
|
||||||
"Microsoft.VisualStudio.Workload.MSBuildTools",
|
"Microsoft.VisualStudio.Workload.MSBuildTools",
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@
|
||||||
"Microsoft.VisualStudio.Component.Azure.Storage.Emulator",
|
"Microsoft.VisualStudio.Component.Azure.Storage.Emulator",
|
||||||
"Microsoft.VisualStudio.Component.VC.ATL",
|
"Microsoft.VisualStudio.Component.VC.ATL",
|
||||||
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
||||||
"Microsoft.VisualStudio.Component.VC.v141.ATL",
|
|
||||||
"Microsoft.VisualStudio.Component.VC.v141.x86.x64",
|
|
||||||
"Microsoft.VisualStudio.Component.Windows10SDK.17134",
|
"Microsoft.VisualStudio.Component.Windows10SDK.17134",
|
||||||
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
||||||
"Microsoft.VisualStudio.Workload.NativeDesktop",
|
"Microsoft.VisualStudio.Workload.NativeDesktop",
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@
|
||||||
"requiredWorkloads": [
|
"requiredWorkloads": [
|
||||||
"Microsoft.VisualStudio.Component.VC.ATL",
|
"Microsoft.VisualStudio.Component.VC.ATL",
|
||||||
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
||||||
"Microsoft.VisualStudio.Component.VC.v141.ATL",
|
|
||||||
"Microsoft.VisualStudio.Component.VC.v141.x86.x64",
|
|
||||||
"Microsoft.VisualStudio.Component.Windows10SDK.17134"
|
"Microsoft.VisualStudio.Component.Windows10SDK.17134"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,6 @@
|
||||||
<ClCompile Include="file_utility.cpp" />
|
<ClCompile Include="file_utility.cpp" />
|
||||||
<ClCompile Include="fx_ver.cpp" />
|
<ClCompile Include="fx_ver.cpp" />
|
||||||
<ClCompile Include="GlobalVersionUtility.cpp" />
|
<ClCompile Include="GlobalVersionUtility.cpp" />
|
||||||
<ClCompile Include="HandleWrapper.cpp" />
|
|
||||||
<ClCompile Include="HostFxr.cpp" />
|
<ClCompile Include="HostFxr.cpp" />
|
||||||
<ClCompile Include="HostFxrResolver.cpp" />
|
<ClCompile Include="HostFxrResolver.cpp" />
|
||||||
<ClCompile Include="HostFxrResolutionResult.cpp" />
|
<ClCompile Include="HostFxrResolutionResult.cpp" />
|
||||||
|
|
@ -280,4 +279,4 @@
|
||||||
<Import Project="..\..\build\native.targets" />
|
<Import Project="..\..\build\native.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
#include "HandleWrapper.h"
|
|
||||||
|
|
||||||
// Workaround for VC++ bug https://developercommunity.visualstudio.com/content/problem/33928/constexpr-failing-on-nullptr-v141-compiler-regress.html
|
|
||||||
const HANDLE InvalidHandleTraits::DefaultHandle = INVALID_HANDLE_VALUE;
|
|
||||||
const HANDLE FindFileHandleTraits::DefaultHandle = INVALID_HANDLE_VALUE;
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
struct InvalidHandleTraits
|
struct InvalidHandleTraits
|
||||||
{
|
{
|
||||||
using HandleType = HANDLE;
|
using HandleType = HANDLE;
|
||||||
static const HANDLE DefaultHandle;
|
static constexpr HANDLE DefaultHandle = nullptr;
|
||||||
static void Close(HANDLE handle) noexcept { CloseHandle(handle); }
|
static void Close(HANDLE handle) noexcept { CloseHandle(handle); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ struct NullHandleTraits
|
||||||
struct FindFileHandleTraits
|
struct FindFileHandleTraits
|
||||||
{
|
{
|
||||||
using HandleType = HANDLE;
|
using HandleType = HANDLE;
|
||||||
static const HANDLE DefaultHandle;
|
static constexpr HANDLE DefaultHandle = nullptr;
|
||||||
static void Close(HANDLE handle) noexcept { FindClose(handle); }
|
static void Close(HANDLE handle) noexcept { FindClose(handle); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -35,16 +35,16 @@ struct ModuleHandleTraits
|
||||||
};
|
};
|
||||||
|
|
||||||
// Code analysis doesn't like nullptr usages via traits
|
// Code analysis doesn't like nullptr usages via traits
|
||||||
#pragma warning( push )
|
#pragma warning(push)
|
||||||
#pragma warning ( disable : 26477 ) // disable Use 'nullptr' rather than 0 or NULL (es.47).
|
#pragma warning(disable : 26477) // disable Use 'nullptr' rather than 0 or NULL (es.47).
|
||||||
|
|
||||||
template<typename traits>
|
template <typename traits>
|
||||||
class HandleWrapper
|
class HandleWrapper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using HandleType = typename traits::HandleType;
|
using HandleType = typename traits::HandleType;
|
||||||
|
|
||||||
HandleWrapper(HandleType handle = traits::DefaultHandle) noexcept : m_handle(handle) { }
|
HandleWrapper(HandleType handle = traits::DefaultHandle) noexcept : m_handle(handle) {}
|
||||||
~HandleWrapper()
|
~HandleWrapper()
|
||||||
{
|
{
|
||||||
if (m_handle != traits::DefaultHandle)
|
if (m_handle != traits::DefaultHandle)
|
||||||
|
|
@ -54,14 +54,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
operator HandleType() noexcept { return m_handle; }
|
operator HandleType() noexcept { return m_handle; }
|
||||||
HandleWrapper& operator =(HandleType value) noexcept
|
HandleWrapper &operator=(HandleType value) noexcept
|
||||||
{
|
{
|
||||||
DBG_ASSERT(m_handle == traits::DefaultHandle);
|
DBG_ASSERT(m_handle == traits::DefaultHandle);
|
||||||
m_handle = value;
|
m_handle = value;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleType* operator&() noexcept { return &m_handle; }
|
HandleType *operator&() noexcept { return &m_handle; }
|
||||||
|
|
||||||
HandleType release() noexcept
|
HandleType release() noexcept
|
||||||
{
|
{
|
||||||
|
|
@ -74,4 +74,4 @@ private:
|
||||||
HandleType m_handle;
|
HandleType m_handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma warning( pop )
|
#pragma warning(pop)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue