Skip to content

Commit

Permalink
Disable CxxFrameHandler4 (#4805)
Browse files Browse the repository at this point in the history
* Disable CxxFrameHandler4

V142 Build tools turn on FH4 (CxxFrameHandler4) by default. This reduces the size of EH maps, but leads to incompatibility with code compiled using older toolsets.

Disable FH4 until consumers (i.e. Office) are on an ABI-safe API or are updated.

Microsoft.ReactNative.dll x64 Release Size:
Before: 2,139 KB
After: 2,294 KB

* Change files
  • Loading branch information
NickGerleman committed May 7, 2020
1 parent 1ef8caf commit d3a3757
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions change/react-native-windows-2020-05-06-05-03-56-no-fh4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Disable CxxFrameHandler4",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch",
"date": "2020-05-06T12:03:56.512Z"
}
13 changes: 13 additions & 0 deletions vnext/PropertySheets/React.Cpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@
</ClCompile>
</ItemDefinitionGroup>

<!--
#4804: CxxFrameHandler4 leads to generated code that incompatible with VS
2015 and 2017. Disable it until consumers are updated or on an ABI-safe API
-->
<ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>/d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalOptions>/d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(ConfigurationType)' == 'Application' OR '$(ConfigurationType)' == 'DynamicLibrary'">
<Link>
<SubSystem>Console</SubSystem>
Expand Down

0 comments on commit d3a3757

Please sign in to comment.