зеркало из https://github.com/github/ruby.git
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.
This commit is contained in:
Родитель
e1a034cb96
Коммит
e5d12f9cce
|
@ -1915,7 +1915,7 @@ shared-gc: probes.h
|
|||
exit 1; \
|
||||
else \
|
||||
echo generating $(shared_gc_dir)librubygc.$(SHARED_GC).$(SOEXT); \
|
||||
$(LDSHARED) -I$(srcdir)/include -I$(srcdir) -I$(arch_hdrdir) -I. $(XDLDFLAGS) $(cflags) -fPIC -o $(shared_gc_dir)librubygc.$(SHARED_GC).$(SOEXT) $(srcdir)/$(SHARED_GC).c; \
|
||||
$(LDSHARED) -I$(srcdir)/include -I$(srcdir) -I$(arch_hdrdir) -I. $(XDLDFLAGS) $(cflags) -fPIC -o $(shared_gc_dir)librubygc.$(SHARED_GC).$(SOEXT) $(srcdir)/gc/$(SHARED_GC).c; \
|
||||
fi
|
||||
|
||||
help: PHONY
|
||||
|
@ -7506,6 +7506,7 @@ gc_impl.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
|
|||
gc_impl.$(OBJEXT): $(CCAN_DIR)/list/list.h
|
||||
gc_impl.$(OBJEXT): $(CCAN_DIR)/str/str.h
|
||||
gc_impl.$(OBJEXT): $(hdrdir)/ruby/ruby.h
|
||||
gc_impl.$(OBJEXT): $(top_srcdir)/gc/gc_impl.c
|
||||
gc_impl.$(OBJEXT): $(top_srcdir)/internal/bits.h
|
||||
gc_impl.$(OBJEXT): $(top_srcdir)/internal/compilers.h
|
||||
gc_impl.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
|
||||
|
@ -7527,7 +7528,7 @@ gc_impl.$(OBJEXT): {$(VPATH)}darray.h
|
|||
gc_impl.$(OBJEXT): {$(VPATH)}debug.h
|
||||
gc_impl.$(OBJEXT): {$(VPATH)}debug_counter.h
|
||||
gc_impl.$(OBJEXT): {$(VPATH)}defines.h
|
||||
gc_impl.$(OBJEXT): {$(VPATH)}gc_impl.c
|
||||
gc_impl.$(OBJEXT): {$(VPATH)}gc/gc_impl.c
|
||||
gc_impl.$(OBJEXT): {$(VPATH)}intern.h
|
||||
gc_impl.$(OBJEXT): {$(VPATH)}internal/abi.h
|
||||
gc_impl.$(OBJEXT): {$(VPATH)}internal/anyargs.h
|
||||
|
|
|
@ -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 $<
|
||||
|
|
|
@ -443,6 +443,8 @@ PREP = miniruby$(EXEEXT)
|
|||
BUILTIN_BINARY = yes
|
||||
!endif
|
||||
|
||||
BUILTIN_GC = default
|
||||
|
||||
!if !defined(EXTSTATIC)
|
||||
EXTSTATIC =
|
||||
!endif
|
||||
|
@ -1336,6 +1338,11 @@ $(ruby_pc): $(RBCONFIG)
|
|||
$(ECHO) compiling $(<:\=/)
|
||||
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
|
||||
|
||||
BUILTIN_GC_PATH = $(srcdir)/gc/$(BUILTIN_GC).c
|
||||
gc_impl.obj: $(BUILTIN_GC_PATH)
|
||||
$(ECHO) compiling $(BUILTIN_GC_PATH:\=/)
|
||||
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(BUILTIN_GC_PATH:\=/)
|
||||
|
||||
{$(srcdir)/missing}.c.asm:
|
||||
$(ECHO) translating $(<:\=/)
|
||||
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
|
||||
|
|
Загрузка…
Ссылка в новой задаче