From 9df2ed64f4731470aeed833900d0878ab217f29b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 5 Nov 2026 11:43:47 +0900 Subject: [PATCH] Flush the instruction cache on arm64 mswin cl and clang-cl do not define __GNUC__, so rb_jit_icache_invalidate() compiled to nothing with cl and hit the #error with clang-cl, which defines __aarch64__. Co-Authored-By: Claude Opus 5.5 --- jit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jit.c b/jit.c index 6a0e0a3fb46..912aa908a6f 100644 --- a/jit.c +++ b/jit.c @@ -1003,6 +1003,8 @@ rb_jit_icache_invalidate(void *start, void *end) // On Darwin it's the same as calling sys_icache_invalidate(). #ifdef __GNUC__ __builtin___clear_cache(start, end); +#elif defined(_M_ARM64) + FlushInstructionCache(GetCurrentProcess(), start, (char *)end - (char *)start); #elif defined(__aarch64__) #error No instruction cache clear available with this compiler on Aarch64! #endif