gallium: Add MCJIT target triplet for Windows ARM64

MCJIT on Windows requires a special LLVM target triplet with ELF object
format, add one for Windows ARM64.

Tested locally on real hardware.

Signed-off-by: GH Cao <driver1998.ms@outlook.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20675>
This commit is contained in:
GH Cao 2023-01-13 01:04:42 +08:00 committed by Marge Bot
parent 982757082e
commit f023548d2f

View file

@ -374,10 +374,14 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
* different strings for MinGW/MSVC, so better play it safe and be
* explicit.
*/
# ifdef _WIN64
# if DETECT_ARCH_X86_64
LLVMSetTarget(M, "x86_64-pc-win32-elf");
# else
# elif DETECT_ARCH_X86
LLVMSetTarget(M, "i686-pc-win32-elf");
# elif DETECT_ARCH_AARCH64
LLVMSetTarget(M, "aarch64-pc-win32-elf");
# else
# error Unsupported architecture for MCJIT on Windows.
# endif
#endif