From 642cfa71bb11363a465dabd9135194e82aec3f07 Mon Sep 17 00:00:00 2001 From: Eduardo Souza Date: Wed, 11 Dec 2024 00:09:57 +0000 Subject: [PATCH] Adding None as a default value for MMTK_PLAN --- Make.inc | 9 ++++++--- src/Makefile | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Make.inc b/Make.inc index ae8e941dac262..e6996a541cc4c 100644 --- a/Make.inc +++ b/Make.inc @@ -80,6 +80,9 @@ HAVE_SSP := 0 WITH_GC_VERIFY := 0 WITH_GC_DEBUG_ENV := 0 +# Use stock if MMTK_PLAN hasn't been defined +MMTK_PLAN ?= None + # Enable DTrace support WITH_DTRACE := 0 @@ -829,7 +832,7 @@ JCXXFLAGS += -DGC_DEBUG_ENV JCFLAGS += -DGC_DEBUG_ENV endif -ifneq ($(MMTK_PLAN), ) +ifneq (${MMTK_PLAN},None) ifeq (${MMTK_JULIA_DIR},) $(error MMTK_JULIA_DIR must be set to use MMTk) endif @@ -1861,7 +1864,7 @@ PRINT_PERL = printf ' %b %b\n' $(PERLCOLOR)PERL$(ENDCOLOR) $(BINCOLOR)$(GOAL) PRINT_FLISP = printf ' %b %b\n' $(FLISPCOLOR)FLISP$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1) PRINT_JULIA = printf ' %b %b\n' $(JULIACOLOR)JULIA$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1) PRINT_DTRACE = printf ' %b %b\n' $(DTRACECOLOR)DTRACE$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1) -ifneq ($(MMTK_PLAN), ) +ifneq (${MMTK_PLAN},None) PRINT_MMTK = printf ' %b %b\n' $(LINKCOLOR)MMTK$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1) endif @@ -1874,7 +1877,7 @@ PRINT_PERL = echo '$(subst ','\'',$(1))'; $(1) PRINT_FLISP = echo '$(subst ','\'',$(1))'; $(1) PRINT_JULIA = echo '$(subst ','\'',$(1))'; $(1) PRINT_DTRACE = echo '$(subst ','\'',$(1))'; $(1) -ifneq ($(MMTK_PLAN), ) +ifneq (${MMTK_PLAN},None) PRINT_MMTK = echo '$(subst ','\'',$(1))'; $(1) endif diff --git a/src/Makefile b/src/Makefile index 5790526faa71c..63a542fa876e9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -42,7 +42,7 @@ endif # GC source code. It depends on which GC implementation to use. GC_SRCS := gc-common gc-stacks gc-alloc-profiler gc-heap-snapshot -ifneq ($(MMTK_PLAN), ) +ifneq (${MMTK_PLAN},None) GC_SRCS += gc-mmtk else GC_SRCS += gc-stock gc-debug gc-pages gc-page-profiler @@ -63,7 +63,7 @@ CG_LLVMLINK := ifeq ($(JULIACODEGEN),LLVM) # Currently these files are used by both GCs. But we should make the list specific to stock, and MMTk should have its own implementation. GC_CODEGEN_SRCS := llvm-final-gc-lowering llvm-late-gc-lowering llvm-gc-invariant-verifier -ifneq ($(MMTK_PLAN), ) +ifneq (${MMTK_PLAN},None) FLAGS += -I$(MMTK_API_INC) GC_CODEGEN_SRCS += llvm-late-gc-lowering-mmtk else @@ -122,7 +122,7 @@ UV_HEADERS += uv.h UV_HEADERS += uv/*.h endif PUBLIC_HEADERS := $(BUILDDIR)/julia_version.h $(wildcard $(SRCDIR)/support/*.h) $(addprefix $(SRCDIR)/,work-stealing-queue.h gc-interface.h gc-tls-common.h julia.h julia_assert.h julia_threads.h julia_fasttls.h julia_locks.h julia_atomics.h jloptions.h) -ifneq ($(MMTK_PLAN), ) +ifneq (${MMTK_PLAN},None) PUBLIC_HEADERS += $(addprefix $(SRCDIR)/,gc-tls-mmtk.h) else PUBLIC_HEADERS += $(addprefix $(SRCDIR)/,gc-tls-stock.h) @@ -250,7 +250,7 @@ $(BUILDDIR)/%.h.gen : $(SRCDIR)/%.d mv $@.tmp $@ # Compile files from the binding side and copy so file into lib folder -ifneq ($(MMTK_PLAN), ) +ifneq (${MMTK_PLAN},None) $(MMTK_LIB_DST): $(MMTK_LIB_SRC) @$(call PRINT_MMTK, cp $< $@) endif