From c21fb62f5070238cb022921bce134cfa2bc670fa Mon Sep 17 00:00:00 2001 From: XrXr Date: Wed, 14 Oct 2026 11:05:50 -0400 Subject: [PATCH] ZJIT: Add macOS --with-gmp build test for ZJIT test binary This is so the build failure in is covered on CI. --- .github/workflows/macos.yml | 3 +++ zjit/zjit.mk | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2d50a377560..ce26bfac796 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -36,6 +36,9 @@ jobs: - test_task: check os: macos-26 configure_args: '--with-jemalloc --with-opt-dir=$(brew --prefix jemalloc)' + - test_task: zjit-test-build + os: macos-26 + configure_args: '--enable-zjit=dev --with-gmp' - test_task: test-bundler-parallel os: macos-26 - test_task: test-bundled-gems diff --git a/zjit/zjit.mk b/zjit/zjit.mk index 7a98bdc6d53..fbfc60aaf8f 100644 --- a/zjit/zjit.mk +++ b/zjit/zjit.mk @@ -58,7 +58,7 @@ ZJIT_BINDGEN_DIFF_OPTS = # Generate Rust bindings. See source for details. # Needs `./configure --enable-zjit=dev` and Clang. ifneq ($(strip $(CARGO)),) # if configure found Cargo -.PHONY: zjit-bindgen zjit-bindgen-show-unused zjit-test zjit-test-update +.PHONY: zjit-bindgen zjit-bindgen-show-unused zjit-test zjit-test-build zjit-test-update .PHONY: zjit-test-debug zjit-test-lldb zjit-test-gdb zjit-test-rr zjit-bindgen: zjit.$(OBJEXT) ZJIT_SRC_ROOT_PATH='$(top_srcdir)' BINDGEN_JIT_NAME=zjit $(CARGO) run --manifest-path '$(top_srcdir)/zjit/bindgen/Cargo.toml' -- $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) @@ -90,6 +90,13 @@ zjit-test: libminiruby.a fi; \ exit $$exit_code +# Build the `make zjit-test` binary without running it. +zjit-test-build: libminiruby.a + $(ECHO) 'building ZJIT test binary' + $(ZJIT_NEXTEST_ENV) $(CARGO) build --tests \ + --manifest-path '$(top_srcdir)/zjit/Cargo.toml' \ + '--features=$(ZJIT_TEST_FEATURES)' + # Accept all pending snapshots (requires cargo-insta) # Install with: cargo install cargo-insta zjit-test-update: