Drop StdCall in favor of Cdecl for x86. #4115
Conversation
This reverts commit 400d986.
|
Patching upstream source and manually marking everything Office uses with cdecl is quite fragile, am I'm not convinced this touches everything we use in ReactCommon for example. This change also means me need to add more patches to React Native/Folly/Yoga, which we're trying hard to remove. I'm personally against this change. If it's easy to miss new things, and adds fork debt, more repos to manage, etc, it seems to me like it's causing more damage than its fixing. E.g. we upgrade Folly, RN, Yoga quite frequently, but don't do the same for OpenSSL. Please let me know if I'm missing something. Would be interested in the opinions of others here as well. |
That would require adding more dependencies on |
Correct. I'm aware of dependent software being potentially impacted. |
|
WINAPIV is declared inside of MinWinDef.h, not Windows.h From quickly taking a look of contents of MinWinDef.h, it looks fairly small and self contained In reply to: 587938026 [](ancestors = 587938026) |
I will be testing this today.
I'll merge this change after addressing feedback. |
|
@JunielKatarn apart from changing defs, do we need to change OpenSSL source at all, or just change compiler flags when producing the x86 binary? I mentioned needing to patch more in ReactCommon, but as soon as we add all React, Yoga, and Folly sources exporting anything as patches, we're going back to near square one for Native deforking efforts, and people will almost definitely patch our code even note. I was just about to remove some of the last of the patches there. Given we were going to remove the rest, would you be willing to take efforts to merge during upgrades, or build tooling we'll need to detect when these are out of date when we're pulling from master? Without exaggeration, this change has the potential to add engineer-months of extra effort in the future relative to changing only OpenSSL. Either way, I agree with @kmelmon that this change has large enough implications that we should discuss with everyone involved. Checkin should be blocked until this happens. |
@NickGerleman With this change, OpenSSL can be built "off the shelf" with not a single change to sources or compiler flags. |
|
I talked to @JunielKatarn offline. We shouldn't need to patch React Native functions, who are using "thiscall". Since there's not a sane way around this for OpenSSL this can make sense as a stopgap. @JunielKatarn will take on ownership of maintaining the patches during upgrades, and upstreaming them. |
|
Hello @JunielKatarn! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
0a432a1
into
microsoft:master
This reverts commit 0a432a1. The change has led to some breakage, and there is new information about Office's needs for the change. Revert this change in master until we have something fully working.
This reverts commit 0a432a1. The change has led to some breakage, and there is new information about Office's needs for the change. Revert this change in master until we have something fully working.
|
Folly isn't designed to be a DLL: it doesn't have an ABI, or versions. The current groupthink internally is that if some project wants to make a folly DLL for their own reasons then it's OK for them to have the burden of choosing the calling convention with the appropriate |
|
Agreed. We should just wait for the work to remove folly from the API boundary before we switch the calling convention used inside react-native-windows back to normal. |
Problem is, we found a case where there are two projects (Say Annotating the proper calling convention would ensure whichever |
The model we expect here is for both A and B to statically link to folly and that neither of them should be exporting any folly symbols. |
We'll look into that :) |


Being built independently, React Native Windows doesn't need to be built with the
__stdcallconvention.Moreover, many third-party dependencies are developed assuming
__cdeclis used (i.e. OpenSSL).__thiscall) exported functions as__cdecl.Microsoft Reviewers: Open in CodeFlow