[MSVC] LLVM failed to build with error MSB8066 when I do the cross-compiling and the target architecture is ARM64EC
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
We are tracking the issue https://github.com/llvm/llvm-project/issues/100335. The error LNK1372 has been fixed, but the error MSB8066 still can reproduce with the latest source code. Could you please help look at this? Thanks in advance!
**Repro steps:**
1. Open a VS2022 x64 command prompt
2. git clone https://github.com/llvm/llvm-project C:\gitP\llvm\llvm-project
3. mkdir C:\gitP\llvm\llvm-project\build_arm64ec & cd /d C:\gitP\llvm\llvm-project\build_arm64ec
4. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=arm64
5. cmake -G "Visual Studio 17 2022" -A ARM64EC -DCMAKE_SYSTEM_VERSION=10.0.26100.0 -DLLVM_ENABLE_PROJECTS="clang" ..\llvm
7. msbuild /m /p:Platform=ARM64EC /p:Configuration=RelWithDebInfo /p:PreferredToolArchitecture=x64 LLVM.sln /t:Rebuild
**Error info:**
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'C:\gitP\llvm\llvm-project\build_arm64ec\CMakeFiles\84af642944000e0b6439f7564b3232a4\arm_mve_builtins.inc.rule' exited with code 1. [C:\gitP\llvm\llvm-project\build_arm64ec\tools\clang\include\clang\Basic\ClangARMMveBuiltinsDef.vcxproj]
.....
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'C:\gitP\llvm\llvm-project\build_arm64ec\CMakeFiles\84af642944000e0b6439f7564b3232a4\arm_mve_builtin_aliases.inc.rule' exited with code 1. [C:\gitP\llvm\llvm-project\build_arm64ec\tools\clang\include\clang\Basic\ClangARMMveBuiltinAliases.vcxproj]
**Attach the log file below:**
[Build (51).log](https://github.com/user-attachments/files/26454399/Build.51.log)
Contributor guide
Research direction
Start with the attached Build (51).log and the generated arm_mve_builtins.inc.rule and arm_mve_builtin_aliases.inc.rule entries under CMakeFiles. Reproduce the issue using the listed VS2022, CMake, and msbuild commands, then trace the failing custom-build steps. Done means an ARM64EC RelWithDebInfo rebuild completes without MSB8066.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100