lightrec: Disable threaded compiler by default
authorPaul Cercueil <paul@crapouillou.net>
Thu, 3 Nov 2022 18:26:45 +0000 (18:26 +0000)
committerPaul Cercueil <paul@crapouillou.net>
Thu, 3 Nov 2022 18:26:53 +0000 (18:26 +0000)
It is still buggy so it's better to disable it by default until it
becomes usable.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Makefile
include/lightrec/lightrec-config.h

index 87613ee..e694818 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -91,12 +91,18 @@ ifeq "$(DYNAREC)" "lightrec"
 CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \
                  -DLIGHTREC -DLIGHTREC_STATIC
 LIGHTREC_CUSTOM_MAP ?= 0
-CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP)
+LIGHTREC_THREADED_COMPILER ?= 0
+CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP) \
+         -DLIGHTREC_ENABLE_THREADED_COMPILER=$(LIGHTREC_THREADED_COMPILER)
 deps/lightning/lib/%.o: CFLAGS += -DHAVE_MMAP
 ifeq ($(LIGHTREC_CUSTOM_MAP),1)
 LDLIBS += -lrt
 OBJS += libpcsxcore/lightrec/mem.o
 endif
+ifeq ($(LIGHTREC_THREADED_COMPILER),1)
+OBJS += deps/lightrec/recompiler.o \
+       deps/lightrec/reaper.o
+endif
 OBJS += deps/lightrec/tlsf/tlsf.o
 OBJS += libpcsxcore/lightrec/plugin.o
 OBJS += deps/lightning/lib/jit_disasm.o \
@@ -113,9 +119,7 @@ OBJS += deps/lightning/lib/jit_disasm.o \
                deps/lightrec/lightrec.o \
                deps/lightrec/memmanager.o \
                deps/lightrec/optimizer.o \
-               deps/lightrec/regcache.o \
-               deps/lightrec/recompiler.o \
-               deps/lightrec/reaper.o
+               deps/lightrec/regcache.o
 libpcsxcore/lightrec/mem.o: CFLAGS += -D_GNU_SOURCE
 ifeq ($(MMAP_WIN32),1)
 CFLAGS += -Iinclude/mman -I deps/mman
index 2fa750f..791eedf 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef __LIGHTREC_CONFIG_H__
 #define __LIGHTREC_CONFIG_H__
 
-#define ENABLE_THREADED_COMPILER 1
+#define ENABLE_THREADED_COMPILER LIGHTREC_ENABLE_THREADED_COMPILER
 #define ENABLE_FIRST_PASS 1
 #define ENABLE_DISASSEMBLER 0
 #define ENABLE_CODE_BUFFER 1