ruby/doc/rjit/rjit.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 строки
1.2 KiB
Markdown
Исходник Обычный вид История

2023-03-07 10:15:30 +03:00
# RJIT
2023-03-07 10:15:30 +03:00
This document has some tips that might be useful when you work on RJIT.
## Supported platforms
The following platforms are either tested on CI or assumed to work.
* OS: Linux, macOS
* Arch: x86\_64, aarch64, arm64, i686, i386
### Not supported
2023-03-07 10:15:30 +03:00
The RJIT support for the following platforms is no longer maintained.
* OS: Windows (mswin, MinGW), Solaris
* Arch: SPARC, s390x
2023-03-07 10:15:30 +03:00
## Developing RJIT
2022-12-22 22:14:58 +03:00
### Bindgen
2023-03-07 10:15:30 +03:00
If you see an "RJIT bindgen" GitHub Actions failure, please commit the `git diff` shown on the failed job.
2022-12-22 22:14:58 +03:00
For doing the same thing locally, run `make mjit-bindgen` after installing libclang.
macOS seems to have libclang by default. On Ubuntu, you can install it with `apt install libclang1`.
### Always run make install
2023-03-07 10:15:30 +03:00
Always run `make install` before running RJIT. It could easily cause a SEGV if you don't.
RJIT looks for the installed header for security reasons.
### --mjit-debug vs --mjit-debug=-ggdb3
`--mjit-debug=[flags]` allows you to specify arbitrary flags while keeping other compiler flags like `-O3`,
which is useful for profiling benchmarks.
`--mjit-debug` alone, on the other hand, disables `-O3` and adds debug flags.
2023-03-07 10:15:30 +03:00
If you're debugging RJIT, what you need to use is not `--mjit-debug=-ggdb3` but `--mjit-debug`.