Age | Commit message (Collapse) | Author |
|
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.
Notes:
Merged: https://github.com/ruby/ruby/pull/13262
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13302
|
|
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.
Notes:
Merged: https://github.com/ruby/ruby/pull/13229
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13154
|
|
Only `class_table` values are not quoted and need to terminate %-=
literal.
|
|
(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
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
|
|
Since IBF result string size should be multiple of 4, this should not
increase the binary size actually.
Notes:
Merged: https://github.com/ruby/ruby/pull/13075
|
|
|
|
which was for MJIT
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12740
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12556
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12563
|
|
`cmd.exe` built-in `cd` does not recognize slashes as path separators,
replace to backslashes.
Notes:
Merged: https://github.com/ruby/ruby/pull/12481
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12451
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12428
|
|
Such as `$(ruby_version)`, `$(arch)` and so on.
Notes:
Merged: https://github.com/ruby/ruby/pull/12428
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12300
|
|
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".
Notes:
Merged: https://github.com/ruby/ruby/pull/12261
|
|
As common.mk is used by nmake.exe, the commands there need to be
accepted also by cmd.exe.
Notes:
Merged: https://github.com/ruby/ruby/pull/12166
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11871
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11871
|
|
```
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)
| ^
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11815
|
|
These keys are made from string literals, and used only as keys of
hashes.
Notes:
Merged: https://github.com/ruby/ruby/pull/11814
|
|
The `RUBY_DESCRIPTION_WITH` macro has been removed already, so there
are no more descriptions strings with rjit/yjit enabled.
Notes:
Merged: https://github.com/ruby/ruby/pull/11766
|
|
Join with a space in `MakeMakefile#libpathflag` instead.
Notes:
Merged: https://github.com/ruby/ruby/pull/11724
|
|
The clean targets should clean up all extensions, including those have
nothing to build for any reason, e.g., platform requirements etc.
Notes:
Merged: https://github.com/ruby/ruby/pull/11588
|
|
exts.mk should deal with cleanings of extensions, including bundled
gems.
Notes:
Merged: https://github.com/ruby/ruby/pull/11588
|
|
Since universal-parser and prism support, prelude code used functions
inaccessible from outside libruby shared library.
```
linking goruby
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:221: undefined reference to `rb_ruby_prism_ptr'
/usr/bin/ld: goruby.o: in function `pm_prelude_load':
/home/runner/work/ruby/ruby/build/golf_prelude.c:192: undefined reference to `pm_options_line_set'
/usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:193: undefined reference to `pm_parse_string'
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:224: undefined reference to `pm_iseq_new_with_opt'
/usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:226: undefined reference to `pm_parse_result_free'
/usr/bin/ld: goruby.o: in function `prelude_ast_value':
/home/runner/work/ruby/ruby/build/golf_prelude.c:181: undefined reference to `rb_ruby_ast_data_get'
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:231: undefined reference to `rb_ruby_ast_data_get'
/usr/bin/ld: goruby.o: in function `pm_prelude_load':
/home/runner/work/ruby/ruby/build/golf_prelude.c:196: undefined reference to `pm_parse_result_free'
collect2: error: ld returned 1 exit status
```
|
|
Refactor out the same code from `rb_builtin_ast_value` and
`pm_builtin_ast_value.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11501
|
|
|
|
|
|
|
|
On OpenBSD the Makefile errors with:
Using $< in a non-suffix rule context is a GNUmake idiom
|
|
Changing the name makes it clear that this is the default GC in Ruby.
|
|
This commit creates a new directory `gc` to put different GC
implementations and moves the default GC from gc_impl.c to gc/gc_impl.c.
The default GC can be easily switched using the `BUILTIN_GC` variable
in Makefile.in.
|
|
Allows building shared GC using `make shared-gc SHARED_GC=gc_impl`
|
|
The CFLAGS might contain flags that only work with the specified CC
|
|
The dtrace python script from systemtap on Linux actually looks at the
CFLAGS environment variable when invoking gcc to make the probes.o file.
If we don't pass the CFLAGS we're using, this probes.o file can wind up
without the required annotations indicating that it supports e.g. Intel
CET.
Fix this by explicitly exporting our build flags to the environment for
this script.
[Bug #18061]
|
|
We already assemble our assembly files using the $(CC) compiler driver,
rather than the actual $(AS) assembler. This means that
* The C preprocessor gets run on the assembly file
* It's valid to pass gcc-style flags to it, like e.g.
-mbranch-protection or -fcf-protection
* If you do so, the relevant preprocessor macros like __CET__ get set
* If you really wanted to pass assembler flags, you would need to do
that using -Wa,... anyway
So I think it makes sense to pass "$(XCFLAGS) $(CFLAGS) $(CPPFLAGS)" to
gcc/clang/etc when assembling, rather than passing $(ASFLAGS) (since
the flags are not actually passed to `as`, but `cc`!).
The side effect of this is that if there are mitigation flags like
-fcf-protection in $CFLAGS, then the relevant macros like __CET__ will
be defined when assembling the files.
[Bug #20601]
|
|
|
|
This changes the automatic detection of -fstack-protector,
-D_FORTIFY_SOURCE, and -mbranch-protection to write to $hardenflags
instead of $XCFLAGS. The definition of $cflags is changed to
"$hardenflags $orig_cflags $optflags $debugflags $warnflags" to match.
Furthermore, these flags are _prepended_ to $hardenflags, rather than
appended.
The implications of doing this are as follows:
* If a CRuby builder specifies cflags="-mbranch-protection=foobar" at
the ./configure script, and the configure script detects that
-mbranch-protection=pac-ret is accepted, then GCC will be invoked as
"gcc -mbranch-protection=pac-ret -mbranch-protection=foobar". Since
the last flags take precedence, that means that user-supplied values
of these flags in $cflags will take priority.
* Likewise, if a CRuby builder explicitly specifies
"hardenflags=-mbranch-protection=foobar", because we _prepend_ to
$hardenflags in our autoconf script, we will still invoke GCC as
"gcc -mbranch-protection=pac-ret -mbranch-protection=foobar".
* If a CRuby builder specifies CFLAGS="..." at the configure line,
automatic detection of hardening flags is ignored as before.
* C extensions will _also_ be built with hardening flags now as well
(this was not the case by default before because the detected flags
went into $XCFLAGS).
Additionally, as part of this work, I changed how the detection of
PAC/BTI in Context.S works. Rather than appending the autodetected
option to ASFLAGS, we simply compile a set of test programs with the
actual CFLAGS in use to determine what PAC/BTI settings were actually
chosen by the builder. Context.S is made aware of these choices through
some custom macros.
The result of this work is that:
* Ruby will continue to choose some sensible defaults for hardening
options for the C compiler
* Distributors are able to specify CFLAGS that are consistent with their
distribution and override these defaults
* Context.S will react to whatever -mbranch-protection is actually in
use, not what was autodetected
* Extensions get built with hardening flags too.
[Bug #20154]
[Bug #20520]
|