Skip to content

Commit

Permalink
Adding None as a default value for MMTK_PLAN
Browse files Browse the repository at this point in the history
  • Loading branch information
udesou committed Dec 11, 2024
1 parent 6253fb9 commit 642cfa7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 642cfa7

Please sign in to comment.