Skip to content
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
2 changes: 1 addition & 1 deletion .github/actions/setup/baseruby/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ runs:
ln -sr "$srcdir" "$builddir/.src"
pushd "$builddir"
.src/configure "--prefix=${installdir}" --disable-install-doc
CONFIGURE_ARGS=--with-out-ext=-test- make install
CONFIGURE_ARGS=--with-out-ext=-test- make install dump_ast
install dump_ast "${installdir}/bin"
{
echo "${installdir}/bin/dump_ast"
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/setup/directories/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@ runs:
shell: bash
working-directory: ${{ inputs.srcdir }}
run: |
ruby tool/missing-baseruby.bat --verbose
touch config.status .rbconfig.time
for mk in Makefile GNUmakefile; do
sed -f tool/prereq.status template/$mk.in > $mk
done
make up
echo RUBY_DUMP_AST=true >> "$GITHUB_ENV"

# Cleanup, runs even on failure
- if: always() && inputs.makeup
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/annocheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ jobs:
sparse-checkout: /.github
persist-credentials: false

- uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1.319.0
with:
ruby-version: '3.1'
bundler: none

- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true

- uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1.319.0
with:
ruby-version: '3.1'
bundler: none

# Minimal flags to pass the check.
# -g0 disables backtraces when SEGV. Do not set that.
- name: Run configure
Expand Down
10 changes: 7 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,16 @@ AC_SUBST(X_BUILD_EXEEXT)
AC_ARG_WITH(dump-ast,
AS_HELP_STRING([--with-dump-ast=DUMP_AST], [use DUMP_AST as dump_ast; for cross-compiling with a host-built dump_ast]),
[DUMP_AST=$withval DUMP_AST_TARGET='$(empty)'],
[AS_IF([test "$cross_compiling" = yes], [
[AS_IF([test ${RUBY_DUMP_AST+set}], [
DUMP_AST="${RUBY_DUMP_AST}"
DUMP_AST_TARGET='$(empty)'
], [test "$cross_compiling" = yes], [
DUMP_AST='build-tool/dump_ast$(BUILD_EXEEXT)'
DUMP_AST_TARGET='$(DUMP_AST)'
], [
DUMP_AST='./dump_ast$(BUILD_EXEEXT)'
])
DUMP_AST_TARGET='$(DUMP_AST)'])
DUMP_AST_TARGET='$(DUMP_AST)'
])])
dnl Without baseruby, .rbinc files cannot be regenerated, so clear the
dnl dependency on dump_ast to avoid rebuilding pre-generated .rbinc files.
AS_IF([test "$HAVE_BASERUBY" = no], [DUMP_AST_TARGET='$(empty)'])
Expand Down
6 changes: 6 additions & 0 deletions win32/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,12 @@ ABI_VERSION_HDR = $(hdrdir)/ruby/internal/abi.h

!if defined(DUMP_AST)
DUMP_AST_TARGET = $(empty)
!else if defined(RUBY_DUMP_AST)
DUMP_AST = $(RUBY_DUMP_AST)
DUMP_AST_TARGET = $(empty)
!else if "$(CROSS_COMPILING)" == "yes"
DUMP_AST = ruby-dump_ast$(BUILD_EXEEXT)
DUMP_AST_TARGET = $(DUMP_AST)
!else
DUMP_AST = dump_ast$(BUILD_EXEEXT)
DUMP_AST_TARGET = $(DUMP_AST)
Expand Down