-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors when linking x64 OBJ files into ARM64EC programs #3382
Comments
We've had yet another customer step on this rake.
the ARM64EC import library needs to provide these symbols. In the long term, I think we need to do a full audit of the STL to ensure that ARM64EC is everywhere ABI-compatible with the X64 library instead of the ARM64 library. |
I hit something similar when I try to link x64 static boost into an ARM64EC project, see rime/weasel#836. (Or I can somehow build boost as ARM64EC?) Right now I use an ARM64X redirection DLL and points to separate x64 and ARM64 DLLs. |
* Adds support for building the STL for the ARM64EC platform. (No testing yet, just build.) * Enable the `__std_init_once_meow` `ALTERNATENAME`s in `src/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 the `ALTERNATENAME`s to support linking with object files built targeting x64. For example, linking x64 static libraries into an ARM64EC binary needs to work. * Isolate x86/x64-specific code in `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 microsoft#3382
When linking x64 OBJ files into ARM64EC programs, users are encountering errors like:
Related to #2635 and #2740.
It appears that for this scenario, we need to provide separately compiled functions in the import lib (the ARM64 import lib?) that x64 object files could be expecting. These functions can perform plain vanilla swaps/reverses/etc., they don't need to be fancy initially. I am not exactly sure what their mangled names should look like, or what the entire fix will look like as a whole. We should be sure to actually validate the fix end-to-end manually (we now have the ability to create ARM64 VMs for internal testing).
Originally reported as DevCom-10219146 and Microsoft-internal VSO-1707080 / AB#1707080 .
The text was updated successfully, but these errors were encountered: