[Build] passing --arm64 to ci_build/build.py has error in arm64 host #20814
Labels
build
build issues; typically submitted using template
platform:windows
issues related to the Windows platform
Describe the issue
--arm64 should not mean that there is cross-compilation. --arm64 flag should work in both arm64 and x64 hosts.
After this PR 8d09baf
--arm64 flag in arm64 host will fail with the following error-check.
CMAKE_HOST_SYSTEM_NAME: Windows CMake Error at external/onnxruntime_external_deps.cmake:189 (message): ONNX_CUSTOM_PROTOC_EXECUTABLE must be set to cross-compile. Call Stack (most recent call first): CMakeLists.txt:586 (include)
Urgency
No response
Target platform
arm64
Build script
build.bat --build_shared_lib --config Release --parallel --skip_submodule_sync --skip_tests --use_binskim_compliant_compile_flags --msvc_toolset v143 --arm64 --enable_msvc_static_runtime --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF "CMAKE_C_FLAGS=/Qspectre /guard:cf /Zi" "CMAKE_CXX_FLAGS=/Qspectre /guard:cf /Zi" "CMAKE_SHARED_LINKER_FLAGS=/guard:cf /DYNAMICBASE /DEBUG" "CMAKE_EXE_LINKER_FLAGS=/guard:cf /DYNAMICBASE /DEBUG"
Error / output
CMAKE_HOST_SYSTEM_NAME: Windows
CMake Error at external/onnxruntime_external_deps.cmake:189 (message):
ONNX_CUSTOM_PROTOC_EXECUTABLE must be set to cross-compile.
Call Stack (most recent call first):
CMakeLists.txt:586 (include)
Visual Studio Version
VS2022
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: