Skip to content

Conversation

@XrXr
Copy link
Member

@XrXr XrXr commented Dec 2, 2025

Big series building up to "ZJIT: Build by default when build environment allows
". Please don't squash.

I tested the following configurations:

--enable-yjit --enable-zjit rustc version Result
1.84 ZJIT-detection=y YJIT=y ZJIT=n
1.85 ZJIT-detection=y YJIT=y ZJIT=y
1.84 ZJIT-detection=y YJIT=y ZJIT=n
1.85 ZJIT-detection=y YJIT=y ZJIT=y
1.84 ZJIT-detection=n YJIT=y ZJIT=y (expected build failure)
1.85 ZJIT-detection=n YJIT=y ZJIT=y
1.50 ZJIT-detection=n YJIT=n YJIT=y (expected build failure)
CI tested N/A

Other configs

default = neither --enable-yjit nor --enable-zjit

default, rustc 1.85, but no cargo => ZJIT-detection=y YJIT=y ZJIT=n

@launchable-app

This comment has been minimized.

@XrXr XrXr force-pushed the zjit-auto-combo-when-cargo branch 2 times, most recently from c7c7d03 to d67aed7 Compare December 3, 2025 02:24
@XrXr XrXr changed the title ZJIT: Detect suitable rustc and join build with YJIT by default ZJIT: Include in build with YJIT by default when possible Dec 3, 2025
@XrXr XrXr changed the title ZJIT: Include in build with YJIT by default when possible ZJIT: Include in build with YJIT by default when build environment allows Dec 3, 2025
@XrXr XrXr linked an issue Dec 3, 2025 that may be closed by this pull request
@XrXr XrXr force-pushed the zjit-auto-combo-when-cargo branch from c73e793 to d787c32 Compare December 3, 2025 20:10
@XrXr XrXr force-pushed the zjit-auto-combo-when-cargo branch 3 times, most recently from 6f21b9f to 9d8656d Compare December 5, 2025 02:49
XrXr added 16 commits December 4, 2025 22:50
> insns.def:857:5: error: assigning to 'rb_zjit_func_t' (aka 'unsigned
> long (*)(struct rb_execution_context_struct *, struct
> rb_control_frame_struct *, unsigned long (*)(struct
> rb_execution_context_struct *, struct rb_control_frame_struct *))') from
> 'void *' converts between void pointer and function pointer
> [-Werror,-Wpedantic]
Mostly YJIT. ZJIT already has the right bindings and this just tweaks
the CI configuration.
Its definition changes depending on e.g. whether there is YJIT in the
build.
    ~/zjit/zjit.mk:30: warning: overriding commands for target `~/build-default/'
    ~/yjit/yjit.mk:26: warning: ignoring old commands for target `~/build-default/'
    ~/zjit/zjit.mk:30: warning: overriding commands for target `~/build-default/'
    ~/yjit/yjit.mk:26: warning: ignoring old commands for target `~/build-default/'
This runs the detection, but does nothing with the result.

 * Fixed version requirement in messages -- ZJIT requires >= 1.85 unlike
  YJIT.
 * New: Detect when rust 1.85 is available, and neither --enable-yjit nor
  --enable-zjit is passed to ./configure, include both YJIT and ZJIT
  in the build
Building ZJIT requires GNU make at the moment.
To get access to `$gnumake`, lift the `make` flavour detection up to the
environment section, before the JIT section runs.
"Default" means when `--enable-zjit` is absent from `./configure`
arguments.
@XrXr XrXr force-pushed the zjit-auto-combo-when-cargo branch from 92a82a5 to ed648cd Compare December 5, 2025 03:50
@XrXr XrXr marked this pull request as ready for review December 5, 2025 03:54
@matzbot matzbot requested a review from a team December 5, 2025 03:54
@XrXr XrXr merged commit d396a66 into ruby:master Dec 5, 2025
102 of 106 checks passed
@XrXr XrXr deleted the zjit-auto-combo-when-cargo branch December 5, 2025 20:49
@tekknolagi
Copy link
Contributor

Wooooooooooo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZJIT: Enable ZJIT by default in the build YJIT, ZJIT: warning: overriding recipe for target on combo build

4 participants