Fix build break where Microsoft.Terminal.Control.dll is empty #9537
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TIL that the
<None Include="Foo.def" />
line in our projects isactually totally meaningless. The important line is the one that's in
cppwinrt.build.pre.props
, where we declareSo if you change a project's name, and not the
.def
file, then thelinker 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, evenwithout the
.def
. But in a Release build, the linker is much moreagressive 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
, andmakes it marginally harder for someone to make the same mistake in the
future.
References
Microsoft.Terminal.TerminalControl
to.Control
; Split into dll & lib #9472PR Checklist
main
is horked, bought farm, etc. #9529