summaryrefslogtreecommitdiff
path: root/common.mk
Commit message (Collapse)AuthorAgeFilesLines
* Warn suspicious flag to `Regexp.new`Nobuyoshi Nakada2022-06-201-0/+3
| | | | | Now second argument should be `true`, `false`, `nil` or Integer. This flag is confused with third argument some times.
* Restore rb_exec_recursive_outerJohn Hawthorn2022-06-151-0/+1
| | | | This was a public method, so we should probably keep it.
* Move RubyVM::MJIT to builtin RubyTakashi Kokubun2022-06-151-0/+4
| | | | just less C code to maintain
* Remove MJIT worker thread (#6006)Takashi Kokubun2022-06-151-0/+5
| | | [Misc #18830]
* Enable "make annocheck" on platforms other than Linux.Jun Aruga2022-06-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The annocheck supports ELF format binaries compiled for any OS and for any architecture. It can work in not only Linux but also FreeBSD and Solaris. It is designed to be independent of the host OS and the architecture. Even in Mac, as the binaries are Mach-O foramt, the annocheck fails correctly with the message. e.g. Test binaries compiled for Mac OSX 10.13.6 (target_os: darwin17) in Fedora 35. ``` $ cat /etc/fedora-release Fedora release 35 (Thirty Five) $ file ruby ruby: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE> $ annocheck ruby annocheck: Version 10.66. annocheck: Warning: ruby: is not an ELF format file. ``` See <https://sourceware.org/bugzilla/show_bug.cgi?id=29173> for details.
* Update the help message on /benchmarkTakashi Kokubun2022-06-071-1/+1
| | | | I wanted to point out there's --output=all.
* `annobin` works only when targeting FedoraNobuyoshi Nakada2022-05-161-3/+3
| | | | | And hopefully for other Linux. Since it is not run on the build os, `TEST_RUNNABLE` is not suitable for this case.
* Add `make test-annocheck` to detect security issues.Jun Aruga2022-05-161-0/+5
| | | | | | | | | | | | | | * Note that as the annocheck binary package is not available on Ubuntu, and it is working in progress in Debian, the script uses Fedora container, and it requires docker or podman command. https://www.debian.org/devel/wnpp/itp.en.html https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926470 * .github/workflows/compilers.yml: Add "gcc-11 annocheck" case. To pass the CI, set `TEST_ANNOCHECK_OPTS: "--skip-pie --skip-notes"` for now. See <https://bugs.ruby-lang.org/issues/18061>. * Skip MJIT tests in case of annocheck case. The MJIT tests fail in the annocheck case. See <https://bugs.ruby-lang.org/issues/18781>.
* Rust YJITAlan Wu2022-04-271-42/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In December 2021, we opened an [issue] to solicit feedback regarding the porting of the YJIT codebase from C99 to Rust. There were some reservations, but this project was given the go ahead by Ruby core developers and Matz. Since then, we have successfully completed the port of YJIT to Rust. The new Rust version of YJIT has reached parity with the C version, in that it passes all the CRuby tests, is able to run all of the YJIT benchmarks, and performs similarly to the C version (because it works the same way and largely generates the same machine code). We've even incorporated some design improvements, such as a more fine-grained constant invalidation mechanism which we expect will make a big difference in Ruby on Rails applications. Because we want to be careful, YJIT is guarded behind a configure option: ```shell ./configure --enable-yjit # Build YJIT in release mode ./configure --enable-yjit=dev # Build YJIT in dev/debug mode ``` By default, YJIT does not get compiled and cargo/rustc is not required. If YJIT is built in dev mode, then `cargo` is used to fetch development dependencies, but when building in release, `cargo` is not required, only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer. The YJIT command-line options remain mostly unchanged, and more details about the build process are documented in `doc/yjit/yjit.md`. The CI tests have been updated and do not take any more resources than before. The development history of the Rust port is available at the following commit for interested parties: https://github.com/Shopify/ruby/commit/1fd9573d8b4b65219f1c2407f30a0a60e537f8be Our hope is that Rust YJIT will be compiled and included as a part of system packages and compiled binaries of the Ruby 3.2 release. We do not anticipate any major problems as Rust is well supported on every platform which YJIT supports, but to make sure that this process works smoothly, we would like to reach out to those who take care of building systems packages before the 3.2 release is shipped and resolve any issues that may come up. [issue]: https://bugs.ruby-lang.org/issues/18481 Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com> Co-authored-by: Kevin Newton <kddnewton@gmail.com>
* Obey spec file locations to rubygemsNobuyoshi Nakada2022-04-071-1/+2
|
* Load fake.rb at `BTESTRUBY`Nobuyoshi Nakada2022-04-051-4/+4
| | | | | So that `mkmf` checks work from `make run`, and also remove duplicate `$(MINIRUBYOPT)` which is used in `$(MINIRUBY)`.
* Remove github and git related files from extracted bundled gemsNobuyoshi Nakada2022-03-311-1/+2
|
* Update dependenciesYusuke Endoh2022-03-301-0/+5
|
* add Unicode auxiliary files and Unicode UCD emoji files download for ↵Martin Dürst2022-03-161-0/+2
| | | | ALWAYS_UPDATE_UNICODE
* switch UNICODE_BETA back to NOMartin Dürst2022-03-131-1/+1
|
* update Unicode Version to 14.0.0 and Emoji version to 14.0Martin Dürst2022-03-131-3/+3
|
* exts.mk.tmpl: propagate MINIRUBY to enc.mk even though invoking from exts.mkYuta Saito2022-03-091-1/+1
| | | | | | | | | | This is another attempt to fix out-of-src build with --with-static-linked-ext. The first attempt was 4f1888bda70981d9f5b1bf55ab692e0ce18e79f4 but reverted because it broke out-of-src build from pre-generated sources via `make dist`. This patch fixes the second trans C source gen, mentioned in the previous commit message, by passing MINIRUBY as well as when invoking from common.mk
* [Feature #18249] Update dependenciesPeter Zhu2022-02-221-0/+88
|
* [DOC] Set the documentation title and main pageNobuyoshi Nakada2022-02-211-1/+3
| | | | | Copied from https://github.com/ruby/docs.ruby-lang.org/ to be as same as docs.ruby-lang.org.
* Try make this more readable and consistent with other targetsDavid Rodríguez2022-02-011-1/+6
|
* Tweaks to freeze bundler CIDavid Rodríguez2022-02-011-2/+1
| | | | | | | | | Currently some specs are broken because `rspec-mocks-3.10.3` is used, which has some breaking changes, apparently. This change makes ruby-core install the same gems installed upstream for running bundle specs, so that things never break with 3rd party releases.
* Transfer the responsibility for MJIT options to mjit.cNobuyoshi Nakada2022-01-151-0/+2
|
* Get rid of building main again when test-bundled-gemsNobuyoshi Nakada2022-01-141-1/+2
|
* Run the prerequisites of test-bundled-gems in orderNobuyoshi Nakada2022-01-021-1/+5
|
* Revert "Do not include external library sources into packages"NARUSE, Yui2021-12-251-2/+1
| | | | This reverts commit a042043487eb4c7d39307b8e784ede1856455c3e.
* Add fiber scheduler hooks for `pread`/`pwrite`, and add support to `IO::Buffer`.Samuel Williams2021-12-231-0/+1
|
* Extended interface for IO::Buffer & documentation.Samuel Williams2021-12-221-0/+1
|
* rbinstall.rb: install ext only when it's configured [Bug #18414]Yuta Saito2021-12-211-0/+1
|
* use `RB_VM_LOCK_ENTER()`Koichi Sasada2021-12-151-0/+2
| | | | | | We found that we need to make Ruby objects while locking the environ to ENV operation atomically, so we decided to use `RB_VM_LOCK_ENTER()` instead of `env_lock`.
* Update dependenciesNobuyoshi Nakada2021-12-151-0/+2
|
* YJIT: Implement new struct accessors (#5161)John Hawthorn2021-11-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | * YJIT: Implement optimized_method_struct_aref * YJIT: Implement struct_aref without method call Struct member reads can be compiled directly into a memory read (with either one or two levels of indirection). * YJIT: Implement optimized struct aset * YJIT: Update tests for struct access * YJIT: Add counters for remaining optimized methods * Check for INT32_MAX overflow It only takes a struct with 0x7fffffff/8+1 members. Also add some cheap compile time checks. * Add tests for non-embedded struct aref/aset Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* Update dependenciesNobuyoshi Nakada2021-11-211-408/+789
|
* Refactor hacky ID tables to struct rb_ast_id_table_tYusuke Endoh2021-11-211-0/+2
| | | | | | | | | The implementation of a local variable tables was represented as `ID*`, but it was very hacky: the first element is not an ID but the size of the table, and, the last element is (sometimes) a link to the next local table only when the id tables are a linked list. This change converts the hacky implementation to a normal struct.
* optimize `Struct` getter/setterKoichi Sasada2021-11-191-0/+1
| | | | | Introduce new optimized method type `OPTIMIZED_METHOD_TYPE_STRUCT_AREF/ASET` with index information.
* GC measurement featureKoichi Sasada2021-11-191-0/+1
| | | | | | | * `GC.measure_total_time = true` enables total time measurement (default: true) * `GC.measure_total_time` returns current flag. * `GC.total_time` returns measured total time in nano seconds. * `GC.stat(:time)` (and Hash) returns measured total time in milli seconds.
* Optimize dynamic string interpolation for symbol/true/false/nil/0-9Jeremy Evans2021-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a significant speedup for symbol, true, false, nil, and 0-9, class/module, and a small speedup in most other cases. Speedups (using included benchmarks): :symbol :: 60% 0-9 :: 50% Class/Module :: 50% nil/true/false :: 20% integer :: 10% [] :: 10% "" :: 3% One reason this approach is faster is it reduces the number of VM instructions for each interpolated value. Initial idea, approach, and benchmarks from Eric Wong. I applied the same approach against the master branch, updating it to handle the significant internal changes since this was first proposed 4 years ago (such as CALL_INFO/CALL_CACHE -> CALL_DATA). I also expanded it to optimize true/false/nil/0-9/class/module, and added handling of missing methods, refined methods, and RUBY_DEBUG. This renames the tostring insn to anytostring, and adds an objtostring insn that implements the optimization. This requires making a few functions non-static, and adding some non-static functions. This disables 4 YJIT tests. Those tests should be reenabled after YJIT optimizes the new objtostring insn. Implements [Feature #13715] Co-authored-by: Eric Wong <e@80x24.org> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> Co-authored-by: Koichi Sasada <ko1@atdot.net>
* Expect bool as `sort:` option at glob [Feature #18287]Nobuyoshi Nakada2021-11-181-0/+3
|
* Mark IO::Buffer as experimental.Samuel Williams2021-11-101-0/+1
|
* IO::Buffer for scheduler interface.Samuel Williams2021-11-101-0/+178
|
* add `make runirb` ruleKoichi Sasada2021-10-281-0/+3
| | | | it's start irb on built ruby (not installed ruby).
* YJIT: Implement duphash (#5009)Ian C. Anderson2021-10-251-0/+1
| | | | | | | | | `duphash` showed up in the top-20 most frequent exit ops for @jhawthorn's benchmark that renders github.com/about The implementation was almost exactly the same as `duparray` Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: John Hawthorn <john@hawthorn.email>
* process.c: Add Process._fork (#5017)Yusuke Endoh2021-10-251-0/+3
| | | | | | | | | | * process.c: Add Process._fork This API is supposed for application monitoring libraries to hook fork event. [Feature #17795] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Add INSTRUBY_OPTS to INSTRUBY_ARGS [ci skip]Nobuyoshi Nakada2021-10-231-2/+3
| | | | | For extra options from the `make` command line. Also add explicit `--install` option to install-nodoc.
* freeze (make shareable) script_linesKoichi Sasada2021-10-211-0/+1
|
* `RubyVM.keep_script_lines`Koichi Sasada2021-10-211-0/+1
| | | | | | | | | | | | | | `RubyVM.keep_script_lines` enables to keep script lines for each ISeq and AST. This feature is for debugger/REPL support. ```ruby RubyVM.keep_script_lines = true RubyVM::keep_script_lines = true eval("def foo = nil\ndef bar = nil") pp RubyVM::InstructionSequence.of(method(:foo)).script_lines ```
* Actually, tabs are okay in MakefileAlan Wu2021-10-201-2/+2
|
* Expand tabsAlan Wu2021-10-201-2/+2
|
* Update dependenciesAlan Wu2021-10-201-0/+9
|
* Remove yjit_backend to help with upstreamingAlan Wu2021-10-201-1/+0
| | | | | | The new backend isn't used at the moment and adds to our diff against upstream so remove it for now. We can reverse the removal later with git history.
* Put YJIT into a single compilation unitAlan Wu2021-10-201-811/+220
| | | | | | | | | | | | | | | | | | | | | For upstreaming, we want functions we export either prefixed with "rb_" or made static. Historically we haven't been following this rule, so we were "leaking" a lot of symbols as `make leak-globals` would tell us. This change unifies everything YJIT into a single compilation unit, yjit.o, and makes everything unprefixed static to pass `make leak-globals`. This manual "unified build" setup is similar to that of vm.o. Having everything in one compilation unit allows static functions to be visible across YJIT files and removes the need for declarations in headers in some cases. Unnecessary declarations were removed. Other changes of note: - switched to MJIT_SYMBOL_EXPORT_BEGIN which indicates stuff as being off limits for native extensions - the first include of each YJIT file is change to be "internal.h" - undefined MAP_STACK before explicitly redefining it since it collide's with a definition in system headers. Consider renaming?