diff --git a/.github/workflows/exotic-builds-testing.yml b/.github/workflows/exotic-builds-testing.yml index 7c57d23815..fb477db40c 100644 --- a/.github/workflows/exotic-builds-testing.yml +++ b/.github/workflows/exotic-builds-testing.yml @@ -48,6 +48,8 @@ jobs: FLAVORFLAGS: -DLUAJIT_DISABLE_JIT=ON - FLAVOR: gdbjit FLAVORFLAGS: -DLUAJIT_USE_GDBJIT=ON + - FLAVOR: no_unwind + FLAVORFLAGS: -DLUAJIT_NO_UNWIND=ON exclude: - ARCH: ARM64 GC64: OFF diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ef10f2f6f..7f5e2afb6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,6 +202,11 @@ if(LUAJIT_DISABLE_UNWIND_JIT) AppendFlags(TARGET_C_FLAGS -DLUAJIT_DISABLE_UNWIND_JIT) endif() +option(LUAJIT_NO_UNWIND "Disable external unwinding.") +if(LUAJIT_NO_UNWIND) + AppendFlags(TARGET_C_FLAGS -DLUAJIT_NO_UNWIND) +endif() + # Disable memory profiler. option(LUAJIT_DISABLE_MEMPROF "LuaJIT memory profiler support" OFF) if(LUAJIT_DISABLE_MEMPROF) diff --git a/src/vm_arm64.dasc b/src/vm_arm64.dasc index 0a12b5b781..1cf1ea519e 100644 --- a/src/vm_arm64.dasc +++ b/src/vm_arm64.dasc @@ -3915,6 +3915,7 @@ static void emit_asm_debug(BuildCtx *ctx) "\t.align 3\n" ".LEFDE1:\n\n", (int)ctx->codesz - fcofs); #endif +#if !LJ_NO_UNWIND fprintf(ctx->fp, "\t.section .eh_frame,\"a\",%%progbits\n"); fprintf(ctx->fp, ".Lframe1:\n" @@ -3982,6 +3983,7 @@ static void emit_asm_debug(BuildCtx *ctx) "\t.byte 0x94\n\t.uleb128 4\n" /* offset x20 */ "\t.align 3\n" ".LEFDE3:\n\n", (int)ctx->codesz - fcofs); +#endif #endif break; #if !LJ_NO_UNWIND