aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-07-09 10:54:15 -0400
committerPeter Zhu <peter@peterzhu.ca>2024-07-11 09:09:47 -0400
commite5d12f9cce913d0677e3bd5135e1a6ffc2b1a272 (patch)
tree32e63166c02528a8866c8df33a8045e84c6e9c6d /template
parente1a034cb9617d76a5ab7fb1345615c08998b2ba7 (diff)
downloadruby-e5d12f9cce913d0677e3bd5135e1a6ffc2b1a272.tar.gz
Move gc_impl.c to gc/gc_impl.c
This commit creates a new directory `gc` to put different GC implementations and moves the default GC from gc_impl.c to gc/gc_impl.c. The default GC can be easily switched using the `BUILTIN_GC` variable in Makefile.in.
Diffstat (limited to 'template')
-rw-r--r--template/Makefile.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/template/Makefile.in b/template/Makefile.in
index 79a23fcdeb..b5da412802 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -67,6 +67,7 @@ RUBY_VERSION_NAME = @RUBY_VERSION_NAME@
UNIVERSAL_ARCHNAMES = @UNIVERSAL_ARCHNAMES@
BUILTIN_BINARY = @X_BUILTIN_BINARY@
+BUILTIN_GC = gc_impl
shared_gc_dir = @shared_gc_dir@
TESTUI = console
@@ -444,6 +445,10 @@ $(srcdir)/enc/jis/props.h: enc/jis/props.kwd
$(CP) $@ $(?:.kwd=.h.blt); \
fi
+gc_impl.$(OBJEXT): gc/$(BUILTIN_GC).c probes.h
+ @$(ECHO) compiling $<
+ $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $<
+
.c.$(OBJEXT):
@$(ECHO) compiling $<
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $<