Enable winrt::make<> detection (#10264)
C++/WinRT has a way to ensure that we use `make<>` instead of allocating WinRT objects on the stack, but until 10.0.19041 the XAML compiler generated code that violated that rule. Because of how make detection is implemented, it must create a derived type (and so WinRT implementation types can't be `final`).
This commit is contained in:
parent
f3ca1ed136
commit
e3281ce354
|
@ -28,7 +28,7 @@ Abstract:
|
|||
|
||||
namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||
{
|
||||
struct WindowManager final : public WindowManagerT<WindowManager>
|
||||
struct WindowManager : public WindowManagerT<WindowManager>
|
||||
{
|
||||
WindowManager();
|
||||
~WindowManager();
|
||||
|
|
|
@ -63,10 +63,6 @@
|
|||
|
||||
<!-- Manually disable unreachable code warning, because jconcpp has a ton of that. -->
|
||||
<DisableSpecificWarnings>4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
|
||||
<!-- Many of our projects use XAML, which cannot handle make detection.
|
||||
We cannot link static libs with differing values of WINRT_NO_MAKE_DETECTION, so let's force it for everyone. -->
|
||||
<PreprocessorDefinitions>WINRT_NO_MAKE_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<Import Project="$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.210309.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.210309.3\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
|
||||
<PropertyGroup Label="Globals">
|
||||
<CppWinRTHeapEnforcement>AnyValueHereWillDisableTheOptOut</CppWinRTHeapEnforcement>
|
||||
<CppWinRTEnabled>true</CppWinRTEnabled>
|
||||
<CppWinRTOptimized>true</CppWinRTOptimized>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
|
@ -75,10 +76,6 @@
|
|||
<DisableSpecificWarnings>28204;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
|
||||
<!-- Many of our projects use XAML, which cannot handle make detection.
|
||||
We cannot link static libs with differing values of WINRT_NO_MAKE_DETECTION, so let's force it for everyone. -->
|
||||
<PreprocessorDefinitions>WINRT_NO_MAKE_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem Condition="'%(SubSystem)'==''">Console</SubSystem>
|
||||
|
|
Loading…
Reference in a new issue