From f4c049fddb2613c5837db83daa2babb3fdf78f70 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Thu, 3 Nov 2022 18:26:45 +0000 Subject: [PATCH] lightrec: Disable threaded compiler by default It is still buggy so it's better to disable it by default until it becomes usable. Signed-off-by: Paul Cercueil --- Makefile | 12 ++++++++---- include/lightrec/lightrec-config.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 87613eed..e694818d 100644 --- 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 diff --git a/include/lightrec/lightrec-config.h b/include/lightrec/lightrec-config.h index 2fa750f4..791eedf4 100644 --- a/include/lightrec/lightrec-config.h +++ b/include/lightrec/lightrec-config.h @@ -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 -- 2.39.5