Fix ARM64EC build failures: LNK4279 POINT icall thunk mismatch with MFC#975
Merged
Merged
Conversation
- Replace PtInRect() calls in Dialog.cpp with an inline lambda to eliminate the ARM64EC icall push thunk conflict between our Dialog.obj (i8 thunk) and the pre-built MFC library uafxcwd.lib/wincore.obj (m8 thunk). - Add /IGNORE:4279 to ARM64EC linker settings in Directory.Build.props to suppress the remaining LNK4279 warning for WindowFromPoint in RichEditOleCallback.cpp vs uafxcw.lib/afxbutton.obj. This warning is a diagnostic false-positive: MSVC 14.51+ changed how it classifies the trivially-copyable 8-byte POINT struct (i8 vs m8), but both thunks produce equivalent code for this struct type. Fixes: build (Debug_Unicode, ARM64EC) and build (Release_Unicode, ARM64EC)
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job build (Debug_Unicode, ARM64EC)
Fix ARM64EC build failures: LNK4279 POINT icall thunk mismatch with MFC
Jun 12, 2026
stephenegriffin
approved these changes
Jun 12, 2026
bwittgen
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ARM64EC builds (
Debug_UnicodeandRelease_Unicode) fail at link time because MSVC 14.51 (VS 18) changed how it classifies thePOINTstruct in ARM64EC icall thunks (i8— integer register) while the pre-built MFC libraries (uafxcwd.lib,uafxcw.lib) were compiled with an older ABI that emitsm8(struct/memory) thunks for the same functions. Since/WXis set, LNK4279 is promoted to LNK1218 (fatal error).Affected imported functions:
PtInRect—Dialog.objvsuafxcwd.lib(wincore.obj)(Debug)WindowFromPoint— LTCG CIL module vsuafxcw.lib(afxbutton.obj)(Release)Changes
UI/Dialogs/Dialog.cpp— Replace the threePtInRect()calls with an inline lambda, removing the imported-function reference fromDialog.objentirely:Directory.Build.props— Add/IGNORE:4279to ARM64EC linker settings to suppress the residual LNK4279 fromWindowFromPoint(an OS API that can't be inlined). For a trivially-copyable 8-byte struct likePOINT, bothi8andm8thunks produce equivalent code, so this is a safe suppression scoped only to ARM64EC.