Fix build break where Microsoft.Terminal.Control.dll is empty (#9537)
TIL that the `<None Include="Foo.def" />` line in our projects is actually totally meaningless. The important line is the one that's in `cppwinrt.build.pre.props`, where we declare ```xml <ModuleDefinitionFile Condition="Exists('$(ProjectName).def')">$(ProjectName).def</ModuleDefinitionFile> ``` So if you change a project's name, and not the `.def` file, then the linker will just _not use the `.def` file at all_. More importantly, this seemingly doesn't matter in debug builds. In a Debug build, the linker will happily still include `WINRT_CanUnloadNow` and `WINRT_GetActivationFactory` in the exports from the dll, even without the `.def`. But in a Release build, the linker is much more agressive about pruning symbols that aren't referenced, and without those two, NONE of the symbols are eventually referenced. This PR fixes `Microsoft.Terminal.Control` by renaming the `.def`, and makes it marginally harder for someone to make the same mistake in the future. ## References * Regressed in #9472 ## PR Checklist * [x] Closes #9529 * [x] I work here
This commit is contained in:
parent
acdcdcaccb
commit
2ed367fb49
|
@ -33,7 +33,7 @@
|
|||
<!-- ========================= Misc Files ======================== -->
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Microsoft.Terminal.Remoting.def" />
|
||||
<None Include="$(ProjectName).def" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="WindowsTerminalShellExt.def" />
|
||||
<None Include="$(ProjectName).def" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<!-- ========================= Misc Files ======================== -->
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="TerminalApp.def" />
|
||||
<None Include="$(ProjectName).def" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<!-- ========================= Misc Files ======================== -->
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="TerminalControl.def" />
|
||||
<None Include="$(ProjectName).def" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
<SubType>Designer</SubType>
|
||||
</PRIResource>
|
||||
<OCResourceDirectory Include="Resources" />
|
||||
<None Include="TerminalSettingsEditor.def" />
|
||||
<None Include="$(ProjectName).def" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="PropertySheet.props" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</Midl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="TerminalSettingsEditor.def" />
|
||||
<None Include="Microsoft.Terminal.Settings.Editor.def" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="PropertySheet.props" />
|
||||
</ItemGroup>
|
||||
|
@ -41,4 +41,4 @@
|
|||
<UniqueIdentifier>{00f725c8-41b4-40a8-995e-8ee2e49a4a4c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<!-- ========================= Misc Files ======================== -->
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Microsoft.Terminal.Settings.Model.def" />
|
||||
<None Include="$(ProjectName).def" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue