Skip to content

Commit

Permalink
Disable RTTI on TerminalApp and friends (#13947)
Browse files Browse the repository at this point in the history
When Leonard updated CLI11 in #12658, he imported a version that no
longer requires RTTI. Since CLI11 was the only reason we had enabled
RTTI in any of our projects, we're finally able to turn it off.

|        | TerminalApp.dll | MSIX Package |
| ------ | ---------------:| ------------:|
| Before |         3180KiB |      6545KiB |
| After  |         1970KiB |      6426KiB |
| Delta  |    **-1210KiB** |  **-119KiB** |

(cherry picked from commit e682cda)
Service-Card-Id: 85546966
Service-Version: 1.15
  • Loading branch information
DHowett committed Sep 9, 2022
1 parent decfc3d commit efb7f30
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
20 changes: 11 additions & 9 deletions dep/CLI11/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{"Registrations":[
{
"$schema": "https://json.schemastore.org/component-detection-manifest.json",
"Registrations": [
{
"component": {
"type": "git",
"git": {
"repositoryUrl": "https://github.com/CLIUtils/CLI11",
"commitHash": "dd0d8e4fe729e5b1110232c7a5c9566dad884686"
}
}
"type": "git",
"git": {
"repositoryUrl": "https://github.com/CLIUtils/CLI11",
"commitHash": "5cb3efabce007c3a0230e4cc2e27da491c646b6c"
}
}
}
],
"Version": 1
],
"Version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@
<Import Project="$(OpenConsoleDir)src\common.nugetversions.props" />
<Import Project="$(OpenConsoleDir)\src\cppwinrt.build.pre.props" />

<ItemDefinitionGroup>
<ClCompile>
<!-- For CLI11: It uses dynamic_cast to cast types around, which depends
on being compiled with RTTI (/GR). -->
<RuntimeTypeInfo>true</RuntimeTypeInfo>
</ClCompile>
</ItemDefinitionGroup>

<!-- ========================= Headers ======================== -->
<ItemGroup>
<ClInclude Include="pch.h" />
Expand Down
7 changes: 0 additions & 7 deletions src/cascadia/TerminalApp/TerminalAppLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
<Import Project="$(OpenConsoleDir)src\common.nugetversions.props" />
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
<ItemDefinitionGroup>
<ClCompile>
<!-- For CLI11: It uses dynamic_cast to cast types around, which depends
on being compiled with RTTI (/GR). -->
<RuntimeTypeInfo>true</RuntimeTypeInfo>
</ClCompile>
</ItemDefinitionGroup>
<!-- ========================= XAML files ======================== -->
<ItemGroup>
<!-- HERE BE DRAGONS:
Expand Down
8 changes: 0 additions & 8 deletions src/cascadia/ut_app/TerminalApp.UnitTests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
<Import Project="$(OpenConsoleDir)\src\common.build.pre.props" />
<Import Project="$(SolutionDir)\src\common.nugetversions.props" />

<ItemDefinitionGroup>
<ClCompile>
<!-- For CLI11: It uses dynamic_cast to cast types around, which depends
on being compiled with RTTI (/GR). -->
<RuntimeTypeInfo>true</RuntimeTypeInfo>
</ClCompile>
</ItemDefinitionGroup>

<!-- ========================= Headers ======================== -->
<ItemGroup>
<ClInclude Include="precomp.h" />
Expand Down

0 comments on commit efb7f30

Please sign in to comment.