Using CMake to build Visual Studio-based C++ projects(and MSVC toolchain) for ARM64EC fails with linker error

Hello all,

I believe the following commit has regressed the building of C++ binaries using Visual Studio and the MSVC toolchain for ARM64EC specifically. We receive a linker error that relates to the additional vftable exports that now get added to the DEF file; the error is a result of said entries not containing the DATA keyword.

Merge topic ‘AutoExport-vftable’ · Kitware/CMake@b297b63

I am thinking that perhaps the vftable symbols should be added to the DataSymbols container instead of Symbols, where I suspect they would organically get the required DATA keyword.

Wanting to vet this on the forum before filing an issue.

Thank you!

Ron

That commit added a data symbol to the exports and revealed that WINDOWS_EXPORT_ALL_SYMBOLS needs implementation updates to handle data symbols for tools targeting ARM64EC. See CMake Issue 26604.

Yes, thanks. I’d welcome a merge request for that. See CONTRIBUTING.rst.

Thanks Brad. I am working with the op that reported the issue to us at Microsoft. It looks like the issue now understood per the latest on https://gitlab.kitware.com/cmake/cmake/-/issues/26604.

Thanks for pointing out that we already support DATA symbols. I’ve opened CMake MR 10187 to fix this.

1 Like