diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml index b9660f6aca..8ed932cf07 100644 --- a/.github/workflows/yjit-ubuntu.yml +++ b/.github/workflows/yjit-ubuntu.yml @@ -164,6 +164,7 @@ jobs: TEST_BUNDLED_GEMS_ALLOW_FAILURES: '' PRECHECK_BUNDLED_GEMS: 'no' SYNTAX_SUGGEST_TIMEOUT: '5' + YJIT_BINDGEN_DIFF_OPTS: '--exit-code' continue-on-error: ${{ matrix.test_task == 'yjit-bench' }} - name: Show ${{ github.event.pull_request.base.ref }} GitHub URL for yjit-bench comparison diff --git a/yjit/yjit.mk b/yjit/yjit.mk index c2553fc0bd..16d7736714 100644 --- a/yjit/yjit.mk +++ b/yjit/yjit.mk @@ -97,13 +97,15 @@ endif $(MAKE) btest RUN_OPTS='--yjit-call-threshold=1' BTESTS=-j $(MAKE) test-all TESTS='$(top_srcdir)/test/ruby/test_yjit.rb' +YJIT_BINDGEN_DIFF_OPTS = + # Generate Rust bindings. See source for details. # Needs `./configure --enable-yjit=dev` and Clang. ifneq ($(strip $(CARGO)),) # if configure found Cargo .PHONY: yjit-bindgen yjit-bindgen-show-unused yjit-bindgen: yjit.$(OBJEXT) YJIT_SRC_ROOT_PATH='$(top_srcdir)' $(CARGO) run --manifest-path '$(top_srcdir)/yjit/bindgen/Cargo.toml' -- $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) - $(Q) if [ 'x$(HAVE_GIT)' = xyes ]; then $(GIT) -C "$(top_srcdir)" diff --exit-code yjit/src/cruby_bindings.inc.rs; fi + $(Q) if [ 'x$(HAVE_GIT)' = xyes ]; then $(GIT) -C "$(top_srcdir)" diff $(YJIT_BINDGEN_DIFF_OPTS) yjit/src/cruby_bindings.inc.rs; fi check-yjit-bindgen-unused: yjit.$(OBJEXT) RUST_LOG=warn YJIT_SRC_ROOT_PATH='$(top_srcdir)' $(CARGO) run --manifest-path '$(top_srcdir)/yjit/bindgen/Cargo.toml' -- $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) 2>&1 | (! grep "unused option: --allow")