...
<PreferredToolArchitecture>ARM64</PreferredToolArchitecture>
Solution
If PreferredToolArchitecture
is provided as an explicit argument to MSBuild
from the command line that seems to work.
CMake
we can pass extra parameters to MSBuild
after --
flagYou will need to use native CMake
build https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28684353912/CMake#Build-from-source , and pass /p:PreferredToolArchitecture=ARM64
to MSBuild through CMake.
Example
cmake --build . -- /p:PreferredToolArchitecture=ARM64
3. Specify a different target processor
Setting -DCMAKE_SYSTEM_PROCESSOR
does not seems to have the expected effect, as it's still set to CMAKE_HOST_SYSTEM_PROCESSOR
. The documentation does not state this explicitly, but it can be interpreted that a CMAKE_TOOLCHAIN_FILE
is needed to set it: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html.
So, instead, write a cross.cmake file:
Code Block |
---|
set(CMAKE_SYSTEM_NAME "Windows") set(CMAKE_SYSTEM_PROCESSOR "ARM64") |
and pass it to cmake instead:
Code Block |
---|
cmake -DCMAKE_TOOLCHAIN_FILE=C:/path/to/cross.cmake |