From f023548d2f34f067e8980bf85513486daf769af9 Mon Sep 17 00:00:00 2001 From: GH Cao Date: Fri, 13 Jan 2023 01:04:42 +0800 Subject: [PATCH] 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 Acked-by: Roland Scheidegger Acked-by: Yonggang Luo Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 2eb89d42e36..334c1353039 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -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