-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Description
Hi: when I use msvc to cross compile LLVM, the host is amd64 and the target is ARM64EC, it failed, can you help take a look? Thanks.
Repro steps:
- Open a VS2022 x64 command prompt
- git clone https://github.com/llvm/llvm-project C:\gitP\llvm\llvm-project
- mkdir C:\gitP\llvm\llvm-project\build_arm64ec & cd /d C:\gitP\llvm\llvm-project\build_arm64ec
- cmake -G "Visual Studio 17 2022" -A ARM64EC -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DLLVM_ENABLE_PROJECTS="clang" ..\llvm
- set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=arm64
- msbuild /m /p:Platform=ARM64EC /p:Configuration=RelWithDebInfo /p:PreferredToolArchitecture=x64 LLVM.sln /t:Rebuild
follow the above steps, it failed with a lot of errors, like error MSB8066
and LLVMSupport.lib(blake3_sse41_x86-64_windows_msvc.obj) : fatal error LNK1372: hybrid map entry target function 'llvm_blake3_compress_in_place_sse41' is not 4-byte aligned
, you can see the detailed log:
Build (2).log
Note:
The above results are what I added 3 lines like below before https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/DebugInfo/CodeView/CodeView.h#L76, otherwise, follow the above repro steps, it would fail due to C:\gitP\llvm\llvm-project\llvm\include\llvm\DebugInfo\CodeView\CodeView.h(137,3): error C2143: syntax error: missing '}' before 'constant'
, you can check the detailed logs:
Build (1).log
#if ARM64EC
#undef ARM64EC
#endif
The commit of LLVM I used is 0af448b