Support x64-only symbols on ARM64EC #3732
Merged
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.
__std_init_once_meow
ALTERNATENAME
s insrc/xonce2.cpp
on ARM64EC. Note that we continue not to use the<mutex>
ALTERNATENAME
s when compiling for ARM64EC - the linkage model is complicated - we only include theALTERNATENAME
s to support linking with object files built targeting x64. For example, linking x64 static libraries into an ARM64EC binary needs to work.src/vector_algorithms.cpp
so we can enable the non-vectorized fallback implementations for ARM64EC. Again, these aren't used when compiling for ARM64EC, but we need the symbols in the import lib to support linking with x64 object files.Fixes #3382
Note that there's no test coverage here. We're close-but-not-ready to support testing of the STL on ARM64, but a ways away from being able to compile an object file for one platform and link it into a binary built for another. I did validate the fix on an ARM64 VM using files
test.cpp
:and
repro.cpp
:compiling
repro.cpp
for x64, and linking the resulting object withtest.cpp
(EDIT: built with/arm64EC
, of course). I performed this process once for each of/MT
,/MTd
,/MD
, and/MDd
and verified the resulting program linked and ran successfully. (Debug should make no difference, but paranoia never hurts.)