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: