Tree-shake the library link list (#3631)

Fixes #3477.
This commit is contained in:
Dustin L. Howett (MSFT) 2019-11-20 09:44:23 -08:00 committed by Michael Niksa
parent 0c2ae7015f
commit 663a1bbe6e

View File

@ -13,20 +13,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<Link> <Link>
<!-- <AdditionalDependencies>onecoreuap_apiset.lib;dwmapi.lib;uxtheme.lib;shlwapi.lib;ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
There's a property that dictates which libraries are linked by default: MinimalCoreWin.
When it's enabled, only a sparing few libraries are injected into Link.AdditionalDependencies.
ARM/ARM64 set it to true, whereas x86/64 do not.
Because the rules check whether MinimalCoreWin is "true" or explicitly blank,
*AND* it being blank is used to determine whether to override it to _be_ "true", we can't actually
set it to something that'll disable it.
(cf. $(VCTargetsPath)/Microsoft.Cpp.CoreWin.props)
Re-inject some necessary libs when MinimalCoreWin has been enabled.
-->
<AdditionalDependencies Condition="'$(MinimalCoreWin)'=='true'">gdi32.lib;advapi32.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>onecoreuap_apiset.lib;onecore_apiset.lib;dwrite.lib;dxgi.lib;d2d1.lib;d3d11.lib;shcore.lib;uxtheme.lib;dwmapi.lib;winmm.lib;pathcch.lib;propsys.lib;uiautomationcore.lib;Shlwapi.lib;ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>