From 27ee3bcd79b12a0c71f00427ee1a2e486c684486 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 19 Sep 2021 17:58:24 +0200 Subject: [PATCH] OSX/ARM64: Disable external unwinding for now. This reduces functionality, e.g. no handling of on-trace errors. Someone with very deep knowledge about macOS and MACH-O/DWARF stack unwinding internals is needed to fix this. See issue #698. --- src/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 2538503f..4650c3e0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -320,7 +320,10 @@ ifeq (Darwin,$(TARGET_SYS)) $(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY) endif TARGET_STRIP+= -x - TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL + # Ext. unwinding is broken on OSX/ARM64 until someone finds a fix. See #698. + ifneq (arm64,$(TARGET_LJARCH)) + TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL + endif TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC TARGET_DYNXLDOPTS= TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER)