未验证 提交 49ce9063 编写于 作者: V Vatsan Madhavan 提交者: GitHub

Move DebugInformationFormat setting to Wpf.Cpp.target (#2531)

* Move DebugInformationFormat setting to Wpf.Cpp.targets; Remove version from sdk import (it's implicit)

* Set debug and optimization settings in targets so that it supersedes settings set by props files
上级 d2a3af9f
......@@ -5,11 +5,9 @@
Use the published SDK from NuGet if available, or local files otherwise.
-->
<Import Sdk="Microsoft.DotNet.Arcade.Wpf.Sdk"
Version="$(MicrosoftDotNetArcadeWpfSdkVersion)"
Project="..\tools\Publishing.props"
Condition="'$(MicrosoftDotNetArcadeWpfSdkVersion)' != ''"/>
<Import Sdk="Microsoft.DotNet.Arcade.Wpf.Sdk"
Version="$(MicrosoftDotNetArcadeWpfSdkVersion)"
Project="..\tools\Publishing.targets"
Condition="'$(MicrosoftDotNetArcadeWpfSdkVersion)' != ''"/>
......
......@@ -57,20 +57,6 @@
<TargetFrameworkSDKToolsDirectory Condition="'$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
<LinkIncremental Condition="'$(ManagedCxx)'=='true'">false</LinkIncremental>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LinkIncremental>false</LinkIncremental>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</PropertyGroup>
<PropertyGroup Condition="'$(ManagedCxx)'=='true'">
<!-- Works around a bug in the C++ compiler where we get the error
'System::ReadOnlySpan::default': could not import member. -->
......@@ -208,14 +194,6 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<!--
Workaround for https://github.com/dotnet/arcade/issues/4763
Embed PDB's into the .lib files directly using /Z7 when building out of
dotnet-wpf-int repo
-->
<DebugInformationFormat Condition="'$(ManagedCxx)' != 'true' and
'$(RepoLocation)' == 'Internal'">oldStyle</DebugInformationFormat>
<!--
Disambiguate the PDB produced by the compiler with a -compile suffix, so that the PDB
produced by the linker is not accidentally clobbered by this one.
......
......@@ -5,6 +5,20 @@
<NativeResourceFileWithVersionInformation Condition="'$(NativeResourceFileWithVersionInformation)' == ''">$(IntermediateOutputPath)ExtendedNativeVersion.rc</NativeResourceFileWithVersionInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
<LinkIncremental Condition="'$(ManagedCxx)'=='true'">false</LinkIncremental>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LinkIncremental>false</LinkIncremental>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</PropertyGroup>
<Import Project="Wpf.Cpp.PrivateTools.targets" Condition="Exists('Wpf.Cpp.PrivateTools.targets') And '$(UsePrivateCppTools)'=='true'"/>
<ItemDefinitionGroup>
......@@ -13,6 +27,14 @@
<AdditionalIncludeDirectories Condition="Exists('$(WpfCommonDir)inc\')">%(AdditionalIncludeDirectories);$(WpfCommonDir)inc\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(NativeVersionFileDirectory);$(WpfTracingDir)native\</AdditionalIncludeDirectories>
<ForcedIncludeFiles>$(WpfSharedDir)inc\ddbanned.h</ForcedIncludeFiles>
<!--
Workaround for https://github.com/dotnet/arcade/issues/4763
Embed PDB's into the .lib files directly using /Z7 when building out of
dotnet-wpf-int repo
-->
<DebugInformationFormat Condition="'$(ManagedCxx)' != 'true' and
'$(RepoLocation)' == 'Internal'">oldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(NativeVersionFileDirectory)</AdditionalIncludeDirectories>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册