[odb-users] Re: Cross-compiling from x86 to ARM on Windows
Boris Kolpackov
boris at codesynthesis.com
Mon Oct 14 04:52:11 EDT 2024
Sunny Sun <sunny.sun at ringcentral.com> writes:
> bpkg create -d libodb-msvc-release cc^
> config.cxx=cl^
> "config.cc.coptions=/std:c++20 /O2 /MD /Zi /arch:armv8.0"^
> "config.bin.lib=static"^
> config.install.root="%CurrentFolder%output\Release"
>
> I tried, but I got
> cl: command line warning D9002: ignoring unknown option "/arch:armv8.0"
This most likely means you are not running ARM64 variant of cl.exe.
Can you run just cl.exe without any options and see what it prints?
The output should contain "for ARM64" (and not "for x64" or "for x86").
There are two ways to ensure you are using the correct cl.exe variant:
1. Use the developer command prompt for ARM64. This is the easiest
option.
2. By specifying the absolute path to cl.exe in config.cxx, for
example (you will need to adjust the path to match your Visual
Studio edition and version):
"config.cxx='C:\Program Files\Microsoft Visual Studio\2002\Community\VC\Tools\MSVC\14.32.313225\bin\Hostx64\arm64\cl.exe'"
More information about the odb-users
mailing list