зеркало из https://github.com/github/ruby.git
Add make target shared-gc
Allows building shared GC using `make shared-gc SHARED_GC=gc_impl`
This commit is contained in:
Родитель
3be9ce3cf6
Коммит
a9f6bd028a
|
@ -263,13 +263,9 @@ jobs:
|
|||
|
||||
- name: Build shared GC
|
||||
run: >
|
||||
make probes.h &&
|
||||
export RUBY_GC_LIBRARY=librubygc.so &&
|
||||
echo "RUBY_GC_LIBRARY=$RUBY_GC_LIBRARY" >> $GITHUB_ENV &&
|
||||
echo "RUBY_GC_LIBRARY=librubygc.gc_impl.so" >> $GITHUB_ENV &&
|
||||
mkdir ${{ matrix.entry.shared_gc_dir }} &&
|
||||
gcc -I../src -I../src/include -I. -I.ext/include/x86_64-linux
|
||||
-Wl,-undefined,dynamic_lookup -fPIC -g -O3 -shared
|
||||
-o ${{ matrix.entry.shared_gc_dir }}/$RUBY_GC_LIBRARY ../src/gc_impl.c
|
||||
make shared-gc SHARED_GC=gc_impl
|
||||
if: ${{ matrix.entry.shared_gc }}
|
||||
|
||||
- name: Add to ext/Setup
|
||||
|
|
12
common.mk
12
common.mk
|
@ -1906,6 +1906,18 @@ rewindable:
|
|||
|
||||
HELP_EXTRA_TASKS = ""
|
||||
|
||||
shared-gc: probes.h
|
||||
$(Q) if test -z $(shared_gc_dir); then \
|
||||
echo "You must configure with --with-shared-gc to use shared GC"; \
|
||||
exit 1; \
|
||||
elif test -z $(SHARED_GC); then \
|
||||
echo "You must specify SHARED_GC with the GC to build"; \
|
||||
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; \
|
||||
fi
|
||||
|
||||
help: PHONY
|
||||
$(MESSAGE_BEGIN) \
|
||||
" Makefile of Ruby" \
|
||||
|
|
|
@ -67,6 +67,8 @@ RUBY_VERSION_NAME = @RUBY_VERSION_NAME@
|
|||
UNIVERSAL_ARCHNAMES = @UNIVERSAL_ARCHNAMES@
|
||||
BUILTIN_BINARY = @X_BUILTIN_BINARY@
|
||||
|
||||
shared_gc_dir = @shared_gc_dir@
|
||||
|
||||
TESTUI = console
|
||||
TESTS =
|
||||
INSTALLDOC = @INSTALLDOC@
|
||||
|
|
|
@ -33,4 +33,6 @@ AS_IF([test x"$shared_gc_dir" != x], [
|
|||
|
||||
shared_gc_summary="no"
|
||||
])
|
||||
|
||||
AC_SUBST(shared_gc_dir, "${shared_gc_dir}")
|
||||
])dnl
|
||||
|
|
Загрузка…
Ссылка в новой задаче