563 Commits
Author SHA1 Message Date
Takashi Kokubun e52562edc0 merge revision(s) c4b3630f5e: [Backport #22003]
[Bug #22003] Refactor template/configure-ext.mk.tmpl

	- Select extension library directories by globbing extconf.rb.
	- Exclude extensions for test before uniquifing bundled gems.
	- Use `Dir.glob` base option to remove prefixed srcdir.
2026-05-11 13:57:59 -07:00
Nobuyoshi Nakada c26057ebaf [Bug #21779] Do not export InitVM functions
Fix ruby/io-console#105.
2025-12-14 11:11:52 +09:00
Alan Wu 029a48176c JITs: Drop cargo and use just rustc for release combo build
So we don't expose builders to network flakiness which cannot be worked
around using cargo's --offline flag.
2025-12-10 16:35:00 -05:00
Nobuyoshi Nakada 52426a22de Remove an excess colon [ci skip] 2025-11-27 08:10:56 +09:00
Nobuyoshi Nakada b9a213f791 Fix timezone of yesterday
Set the `TZ environment variable.  `git log` does not recognize UTC
offset in `--before` option, unless full datetime is given.
2025-11-21 17:34:03 +09:00
Étienne Barrié 03f714de62 Remove warning when generating $(arch)-fake.rb
This happens if BASERUBY is Ruby 3.4.

    $ rm -f *-fake.rb && make test-precheck RUBYOPT=-w >/dev/null
    build/arm64-darwin24-fake.rb:28: warning: ::Ruby is reserved for Ruby 3.5
2025-10-07 12:33:50 +09:00
Nobuyoshi Nakada a2849239db Expect git -C <path> to work
This option is available since git 1.8.5 that was released in 2013.
2025-09-16 20:28:37 +09:00
Takashi Kokubun 0cec87399d Rename VM instruction classes to singular names (#14507) 2025-09-10 14:04:33 -07:00
Takashi Kokubun 4f030951f2 ZJIT: Invalidate local variables on EP escape (#14448) 2025-09-05 11:26:01 -07:00
Mari Imaizumi ed0ffcdc80 Remove unnecessary Enumerable#each_slice
This method has been a built-in feature since Ruby 1.8.7, so this
fallback implementation is no longer needed.

Ref: https://docs.ruby-lang.org/en/3.4/NEWS/NEWS-1_8_7.html
2025-09-01 08:17:21 +09:00
Nobuyoshi Nakada d0d7f55005 Gererate prism source files dependencies from template.rb
Update included file list automatically.
2025-08-19 11:55:23 +09:00
Nobuyoshi Nakada 90cb2bb871 Gererate prism source files dependencies from template.rb 2025-08-18 01:01:31 +09:00
Nobuyoshi Nakada 7c28fb2fb2 [Bug #21546] Make the generated pc file relocatable 2025-08-17 17:13:15 +09:00
Nobuyoshi Nakada 401932c18f NMake needs caret to escape a hash sign 2025-08-12 18:19:09 +09:00
Nobuyoshi Nakada b3598cf2a3 Win: Strip CRs from cpp and nm output
The combination of mingw tools and cygin/msys2 ruby leaves CRs.
2025-08-01 00:15:27 +09:00
Jean Boussier d488935910 Get rid of ID_JUNK
It has been aliased as ID_INTERNAL for a long time and that alias
is much more descriptive.
2025-07-28 12:22:42 +02:00
Nobuyoshi Nakada fb6f255028 Rename builtin_binary.inc as .rbbin
Distinguish between platform-dependent ".rbbin" and platform-
independent ".inc" files.
2025-07-26 20:19:55 +09:00
Hiroshi SHIBATA be7b1164e6 Split autogenerated dependency to depend file from common.mk 2025-07-25 19:50:06 +09:00
Alan Wu 5ee3937a9c ZJIT: Have make zjit-test use the same Cargo features as miniruby
This is so that e.g. building with `--enable-zjit=dev` will test with the
disassembly feature. It makes more sense, saves on build time and
reveals that
`backend::arm64::tests::sp_movements_are_single_instruction` was in
fact failing with the `disasm` feature.
2025-07-16 14:10:22 -04:00
Alan Wu 92b218fbc3 YJIT: ZJIT: Allow both JITs in the same build
This commit allows building YJIT and ZJIT simultaneously, a "combo
build". Previously, `./configure --enable-yjit --enable-zjit` failed. At
runtime, though, only one of the two can be enabled at a time.

Add a root Cargo workspace that contains both the yjit and zjit crate.
The common Rust build integration mechanisms are factored out into
defs/jit.mk.

Combo YJIT+ZJIT dev builds are supported; if either JIT uses
`--enable-*=dev`, both of them are built in dev mode.

The combo build requires Cargo, but building one JIT at a time with only
rustc in release build remains supported.
2025-05-15 00:39:03 +09:00
Nobuyoshi Nakada b48b841378 digest.so needs ruby/digest.h which is installed by build-ext 2025-05-12 02:50:25 +09:00
Alan Wu 33909a1c69 YJIT: ZJIT: Share identical glue functions
Working towards having YJIT and ZJIT in the same build, we need to
deduplicate some glue code that would otherwise cause name collision.
Add jit.c for this and build it for YJIT and ZJIT builds. Update bindgen
to look at jit.c; some shuffling of functions in the output, but the set
of functions shouldn't have changed.
2025-05-02 23:47:57 +09:00
Nobuyoshi Nakada b42afa1dbc Suppress gcc 15 unterminated-string-initialization warnings 2025-04-30 20:04:10 +09:00
Nobuyoshi Nakada 37db51b441 Suppress error message when gc is cleaned already [ci skip] 2025-04-28 19:55:26 +09:00
Nobuyoshi Nakada 59c7b3840d Check Unicode version of the normalization table 2025-04-23 14:14:36 +09:00
Nobuyoshi Nakada 3b7dd205a5 Remove extra empty expressions
Only `class_table` values are not quoted and need to terminate %-=
literal.
2025-04-22 21:09:26 +09:00
Takashi Kokubun 0a543daf15 Add zjit_* instructions to profile the interpreter (https://github.com/Shopify/zjit/pull/16)
* Add zjit_* instructions to profile the interpreter

* Rename FixnumPlus to FixnumAdd

* Update a comment about Invalidate

* Rename Guard to GuardType

* Rename Invalidate to PatchPoint

* Drop unneeded debug!()

* Plan on profiling the types

* Use the output of GuardType as type refined outputs
2025-04-18 21:52:59 +09:00
Takashi Kokubun 92d48f47a3 Use separate cargo build flags 2025-04-18 21:52:57 +09:00
Alan Wu 5208720746 Pass CARGO_BUILD_ARGS through properly 2025-04-18 21:52:56 +09:00
Takashi Kokubun 8ad08f1126 Fix template/Makefile.in 2025-04-18 21:52:55 +09:00
Martin Dürst 900ece77b2 prepare Unicode normalization for Unicode 16.0.0 2025-04-18 16:07:17 +09:00
Nobuyoshi Nakada e25889951f Ensure builtin binaries are aligned to ibf_header
Since IBF result string size should be multiple of 4, this should not
increase the binary size actually.
2025-04-06 12:24:23 +09:00
Hiroshi SHIBATA 589713bcb5 Ignore to build C extension for test files of bundled gems 2025-03-28 11:15:29 +09:00
Takashi Kokubun e8f8565dc2 Remove obsoleted insn_may_depend_on_sp_or_pc()
which was for MJIT
2025-03-05 16:23:31 -08:00
Nobuyoshi Nakada 4a67ef09cc [Feature #21116] Extract RJIT as a third-party gem 2025-02-13 18:01:03 +09:00
Alan Wu bfcf36fe22 YJIT doesn't merge archives anymore [ci skip] 2025-02-11 19:46:07 -05:00
ydah ccb4ba45ed Use LRAMA instead of YACC 2025-01-14 17:20:02 +09:00
Nobuyoshi Nakada 060ae17c80 CPPFLAGS is needed for dtrace not only INCFLAGS 2025-01-13 09:56:21 +09:00
Nobuyoshi Nakada e109400748 Win32: Fix sub make commands
`cmd.exe` built-in `cd` does not recognize slashes as path separators,
replace to backslashes.
2024-12-27 16:26:14 +09:00
Nobuyoshi Nakada b923a59b8e fake.rb: Override constants in Ruby module 2024-12-25 19:12:31 +09:00
Nobuyoshi Nakada 4fb5d746ce Split modular-gc into build and installation 2024-12-22 22:10:26 +09:00
Nobuyoshi Nakada 2f2530b195 Allow variables in modular_gc_dir
Such as `$(ruby_version)`, `$(arch)` and so on.
2024-12-22 22:10:26 +09:00
Nobuyoshi Nakada f12e2622c1 Split system dependent commands to clean modular-gc 2024-12-10 12:31:47 +09:00
Peter Zhu ce1ad1b816 Standardize on the name "modular GC"
We have name fragmentation for this feature, including "shared GC",
"modular GC", and "external GC". This commit standardizes the feature
name to "modular GC" and the implementation to "GC library".
2024-12-05 10:33:26 -05:00
Nobuyoshi Nakada c5d31cb96b Shell dependent command should be in Makefile.in
As common.mk is used by nmake.exe, the commands there need to be
accepted also by cmd.exe.
2024-11-26 19:06:21 +09:00
Peter Zhu 372bb990ac Remove unused PRELOADENV macro in ruby-runner.h 2024-10-11 09:02:48 -04:00
Peter Zhu df2fb88028 Remove unused SOEXT macro in ruby-runner.h 2024-10-11 09:02:48 -04:00
Nobuyoshi Nakada 1f39184bc7 Substitute coroutine_transfer with prefixed symbol in Makefile
```
coroutine/arm64/Context.S:31:57: error: invoking macro TOKEN_PASTE argument 1: empty macro arguments are undefined in ISO C90 [-Wpedantic]
   31 | .global PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
      |                                                         ^
```
2024-10-08 23:29:49 +09:00
Nobuyoshi Nakada 67591b545c Make rbconfig/sizeof keys US-ASCII 2024-10-07 19:20:08 +09:00
Nobuyoshi Nakada dbb1abacf0 Make rbconfig/sizeof keys as literals
These keys are made from string literals, and used only as keys of
hashes.
2024-10-07 18:45:07 +09:00