Skip to content

Commit 32d38fb

Browse files
authored
Adding None as a default value for MMTK_PLAN (#81)
1 parent 6253fb9 commit 32d38fb

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Make.inc

+6-3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ HAVE_SSP := 0
8080
WITH_GC_VERIFY := 0
8181
WITH_GC_DEBUG_ENV := 0
8282

83+
# Use stock if MMTK_PLAN hasn't been defined
84+
MMTK_PLAN ?= None
85+
8386
# Enable DTrace support
8487
WITH_DTRACE := 0
8588

@@ -829,7 +832,7 @@ JCXXFLAGS += -DGC_DEBUG_ENV
829832
JCFLAGS += -DGC_DEBUG_ENV
830833
endif
831834

832-
ifneq ($(MMTK_PLAN), )
835+
ifneq (${MMTK_PLAN},None)
833836
ifeq (${MMTK_JULIA_DIR},)
834837
$(error MMTK_JULIA_DIR must be set to use MMTk)
835838
endif
@@ -1861,7 +1864,7 @@ PRINT_PERL = printf ' %b %b\n' $(PERLCOLOR)PERL$(ENDCOLOR) $(BINCOLOR)$(GOAL)
18611864
PRINT_FLISP = printf ' %b %b\n' $(FLISPCOLOR)FLISP$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
18621865
PRINT_JULIA = printf ' %b %b\n' $(JULIACOLOR)JULIA$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
18631866
PRINT_DTRACE = printf ' %b %b\n' $(DTRACECOLOR)DTRACE$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
1864-
ifneq ($(MMTK_PLAN), )
1867+
ifneq (${MMTK_PLAN},None)
18651868
PRINT_MMTK = printf ' %b %b\n' $(LINKCOLOR)MMTK$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
18661869
endif
18671870

@@ -1874,7 +1877,7 @@ PRINT_PERL = echo '$(subst ','\'',$(1))'; $(1)
18741877
PRINT_FLISP = echo '$(subst ','\'',$(1))'; $(1)
18751878
PRINT_JULIA = echo '$(subst ','\'',$(1))'; $(1)
18761879
PRINT_DTRACE = echo '$(subst ','\'',$(1))'; $(1)
1877-
ifneq ($(MMTK_PLAN), )
1880+
ifneq (${MMTK_PLAN},None)
18781881
PRINT_MMTK = echo '$(subst ','\'',$(1))'; $(1)
18791882
endif
18801883

src/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ endif
4242

4343
# GC source code. It depends on which GC implementation to use.
4444
GC_SRCS := gc-common gc-stacks gc-alloc-profiler gc-heap-snapshot
45-
ifneq ($(MMTK_PLAN), )
45+
ifneq (${MMTK_PLAN},None)
4646
GC_SRCS += gc-mmtk
4747
else
4848
GC_SRCS += gc-stock gc-debug gc-pages gc-page-profiler
@@ -63,7 +63,7 @@ CG_LLVMLINK :=
6363
ifeq ($(JULIACODEGEN),LLVM)
6464
# Currently these files are used by both GCs. But we should make the list specific to stock, and MMTk should have its own implementation.
6565
GC_CODEGEN_SRCS := llvm-final-gc-lowering llvm-late-gc-lowering llvm-gc-invariant-verifier
66-
ifneq ($(MMTK_PLAN), )
66+
ifneq (${MMTK_PLAN},None)
6767
FLAGS += -I$(MMTK_API_INC)
6868
GC_CODEGEN_SRCS += llvm-late-gc-lowering-mmtk
6969
else
@@ -122,7 +122,7 @@ UV_HEADERS += uv.h
122122
UV_HEADERS += uv/*.h
123123
endif
124124
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)
125-
ifneq ($(MMTK_PLAN), )
125+
ifneq (${MMTK_PLAN},None)
126126
PUBLIC_HEADERS += $(addprefix $(SRCDIR)/,gc-tls-mmtk.h)
127127
else
128128
PUBLIC_HEADERS += $(addprefix $(SRCDIR)/,gc-tls-stock.h)
@@ -250,7 +250,7 @@ $(BUILDDIR)/%.h.gen : $(SRCDIR)/%.d
250250
mv $@.tmp $@
251251

252252
# Compile files from the binding side and copy so file into lib folder
253-
ifneq ($(MMTK_PLAN), )
253+
ifneq (${MMTK_PLAN},None)
254254
$(MMTK_LIB_DST): $(MMTK_LIB_SRC)
255255
@$(call PRINT_MMTK, cp $< $@)
256256
endif

0 commit comments

Comments
 (0)