Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Move gc_impl.c to gc/default.c #11132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ jobs:
- { name: UNIVERSAL_PARSER, env: { cppflags: '-DUNIVERSAL_PARSER' } }
- name: SHARED_GC
shared_gc: true
shared_gc_dir: '../gc'
shared_gc_dir: '/ruby_gc'
env:
append_configure: '--with-shared-gc=../gc'
append_configure: '--with-shared-gc=/ruby_gc'

name: ${{ matrix.entry.name }}

Expand Down Expand Up @@ -263,9 +263,9 @@ jobs:

- name: Build shared GC
run: >
echo "RUBY_GC_LIBRARY=librubygc.gc_impl.so" >> $GITHUB_ENV &&
echo "RUBY_GC_LIBRARY=librubygc.default.so" >> $GITHUB_ENV &&
mkdir ${{ matrix.entry.shared_gc_dir }} &&
make shared-gc SHARED_GC=gc_impl
make shared-gc SHARED_GC=default
if: ${{ matrix.entry.shared_gc }}

- name: Add to ext/Setup
Expand Down
4 changes: 2 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/default.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
Expand All @@ -7527,7 +7528,6 @@ 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)}intern.h
gc_impl.$(OBJEXT): {$(VPATH)}internal/abi.h
gc_impl.$(OBJEXT): {$(VPATH)}internal/anyargs.h
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions template/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ RUBY_VERSION_NAME = @RUBY_VERSION_NAME@
UNIVERSAL_ARCHNAMES = @UNIVERSAL_ARCHNAMES@
BUILTIN_BINARY = @X_BUILTIN_BINARY@

BUILTIN_GC = default
shared_gc_dir = @shared_gc_dir@

TESTUI = console
Expand Down Expand Up @@ -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 $<
Expand Down
7 changes: 7 additions & 0 deletions win32/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ PREP = miniruby$(EXEEXT)
BUILTIN_BINARY = yes
!endif

BUILTIN_GC = default

!if !defined(EXTSTATIC)
EXTSTATIC =
!endif
Expand Down Expand Up @@ -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)$(<:\=/)
Expand Down
Loading