summaryrefslogtreecommitdiffhomepage
path: root/build_config
AgeCommit message (Collapse)Author
2021-10-30boxing_nan.h: allow `MRB_INT64` with `MRB_NAN_BOXING`.Yukihiro "Matz" Matsumoto
Integers out of 32 bit range will be allocated in the heap.
2021-10-21Added testing support for cross-MinGW builds.Chris Reuter
This adds a build_config that will cross-build a Windows executable using the MinGW cross-compiler and will also run the unit (i.e. 'rake test') using Wine. For this to work, I made some modifications to the underlying test scripts as well as some minor changes to a couple of the tests themselves.
2021-10-18Fix a syntax error in commented-out codeYAMAMOTO Yuji
By uncommenting the line changed by this commit, `ruby -c build_config/default.rb` complains of a syntax error due to the illegally nested double quotes
2021-09-30dreamcast_shelf.rb: remove unnecessary gem lines.Yukihiro "Matz" Matsumoto
- `mruby-binding-core` should be handle through dependency - `mruby-inline-struct` is only for tests
2021-09-20Update `struct` initializer to work with relatively older `C++`.Yukihiro "Matz" Matsumoto
2021-09-01build_config/ci/gcc-clang.rb: enable `MRB_UTF8_STRING`.Yukihiro "Matz" Matsumoto
2021-08-20Specify potential values for SERENITY_ARCHDante Catalfamo
2021-08-20Replace 32-bit serenity config with 64-bit compatible version.Dante Catalfamo
2021-08-19Add serenity-32bit crossbuildDante Catalfamo
Cross compile mruby for SerenityOS (https://github.com/SerenityOS/serenity)
2021-06-22Rename two files for consistency; close #5488Yukihiro "Matz" Matsumoto
* android_arm64-v8a.rb -> android_arm64_v8a.rb * no-float.rb -> host-nofloat.rb
2021-06-16Run pre-commit with GitHub ActionsJohn Bampton
Running pre-commit with GitHub Actions now gives us more tests and coverage Remove duplicate GitHub Actions for merge conflicts and trailing whitespace Remove duplicate checks for markdownlint and yamllint from the GitHub Super-Linter Add new custom pre-commit hook running with a shell script to sort alphabetically and uniquify codespell.txt Add new pre-commit hook to check spelling with codespell https://github.com/codespell-project/codespell Fix spelling
2021-04-26build_config/no-float.rb: unify two build configurations; #5421Yukihiro "Matz" Matsumoto
- stop cross building - add more gems for tests - add `bintest`
2021-04-24build_config/nofloat.rb: build configuration with `MRB_NO_FLOAT`; #5421Yukihiro "Matz" Matsumoto
2021-04-16feat(CI): add the GitHub Super LinterJohn Bampton
The GitHub Super Linter is a more robust and better supported tool than the current GitHub Actions we are using. Running these checks: ERROR_ON_MISSING_EXEC_BIT: true VALIDATE_BASH: true VALIDATE_BASH_EXEC: true VALIDATE_EDITORCONFIG: true VALIDATE_MARKDOWN: true VALIDATE_SHELL_SHFMT: true VALIDATE_YAML: true https://github.com/marketplace/actions/super-linter https://github.com/github/super-linter Added the GitHub Super Linter badge to the README. Also updated the pre-commit framework and added more documentation on pre-commit. Added one more pre-commit check: check-executables-have-shebangs Added one extra check for merge conflicts to our GitHub Actions. EditorConfig and Markdown linting. Minor grammar and spelling fixes. Update linter.yml
2021-04-07Removing trailing white spaces; ref #5406 [ci skip]Yukihiro "Matz" Matsumoto
2021-04-06dreamcast_shelf: typo fix.SiZiOUS
2021-04-06Updating dreamcast_shelf build configuration.SiZiOUS
2021-03-22nintendo_switch.rb: remove trailing white spaces; #5386Yukihiro "Matz" Matsumoto
2021-03-22Merge pull request #5386 from LanzaSchneider/masterYukihiro "Matz" Matsumoto
Add example for cross-compiling to Nintendo Switch
2021-03-21Add example for cross-compiling to Nintendo SwitchLanza
Cross Compiling configuration for the Nintendo Switch, it requires Nintendo SDK
2021-03-21Add configuration for MinGW cross compilation [ci skip]KOBAYASHI Shuji
With this cross compiler configuration, all tests for full-core gembox on Windows on GitHub Actions were successful.
2021-03-07chore: fix spellingJohn Bampton
2021-03-04Update minimal build configuration [ci skip]KOBAYASHI Shuji
2021-03-01minimal.rb: add minimal configuration; ref #1225Yukihiro "Matz" Matsumoto
2021-02-16Use `full-core` gembox for `clang-asan` configuration.Yukihiro "Matz" Matsumoto
For better coverage.
2021-02-14Remove trailing tab in `build_config/dreamcast_shelf.rb` [ci skip]KOBAYASHI Shuji
2021-02-07Add `host-f32` config to test `MRB_USE_FLOAT32`; ref #5329Yukihiro "Matz" Matsumoto
2021-01-31Change `.o.d` back to `.d` because `.pi.d` is no longer createdKOBAYASHI Shuji
2021-01-28Refine `preprocess_options`; ref d95ffb036KOBAYASHI Shuji
If we modify an option that may have been specified by users, we may make unintended changes, so it is better not to modify it as much as possible, IMO.
2021-01-19Compile `mruby-bin-debugger` with `ci/gcc-clang.rb`.Yukihiro "Matz" Matsumoto
2021-01-11Remove unneeded `mruby-test` gem in `build_config/no-float.rb` [ci skip]KOBAYASHI Shuji
Use `enable_test` to enable the test.
2021-01-11Fix annotations [ci skip]dearblue
2021-01-10Fix build error in cross-build with presymKOBAYASHI Shuji
Fix the following issues. * https://github.com/mruby/mruby/pull/5220#issuecomment-757204258 * https://github.com/mruby/mruby/pull/5220#issuecomment-757205572
2021-01-08Stop immediate flush to stdout/stderr when running in parallel on CIKOBAYASHI Shuji
During parallel execution (build), it is sometimes flushed before line breaks, and lines are concatenated.
2021-01-07Immediately flush output to stdout/stderr so that logs are not mixed on CIKOBAYASHI Shuji
Set in build configuration to enable on all CI platforms.
2021-01-06Merge branch 'improve-source-scanning-for-presym' of ↵Yukihiro "Matz" Matsumoto
https://github.com/shuujii/mruby into shuujii-improve-source-scanning-for-presym
2020-12-23Add example for cross-compiling to Nintendo GameBoyAdvanceGwen Boatrite
2020-12-21refactor: fix Rake link and fix missing HTTPS on linksJohn Bampton
2020-12-19refactor: fix case of GitHub and fix missing HTTPS on linkJohn Bampton
- changed `github` to `GitHub`
2020-12-16Rename build configuration files for CIKOBAYASHI Shuji
Currently, there are build configuration files for CI, `travis.rb` and `appveyor.rb`, but they are used for GCC/Clang and MSVC, not for Travis CI and Appveyor, respectively. Therefore, rename them to `gcc-clang.rb` and `msvc.rb`, respectively, and move them under `build_config/ci/` to clarify that they are for CI.
2020-12-16Guess toolchain when `MRuby::Build#toolchain` argument is omittedKOBAYASHI Shuji
2020-12-15refactor: remove trailing whitespace from C, Header, Ruby and YAML filesJohn Bampton
Lint
2020-12-13Fix spellingJohn Bampton
2020-12-13Improve source scanning for presymKOBAYASHI Shuji
The accuracy is greatly improved by using the C preprocessor to scan C sources for presym. C preprocessor can perfectly interpret all comments and preprocessor directives, so it can detect all symbols defined, for example `mrbgems/mruby-socket/src/const.cstub`. Also, as described later, this change will greatly improve the accuracy of presym detection from Ruby sources. ## Result The number of lines in the `presym` file for all gems is as follows: ```console Previous: 999 (false positive = 89, undetected = 297) New: 1207 ``` ## Build process The new build process (with presym) is as follows: 1. Build `mrbc` without presym (more on building without presym later). 2. Compile Ruby sources to C struct format with the `mrbc` created in step 1, and create` mrblib.c` and `gem_init.c`. Note that the symbols in the created files are output as `MRB_SYM` family macros or `mrb_intern_lit` instead of IDs (details will be described later). 3. C preprocessor processes C sources including the created files of step 2 and outputs them as `.i` files. In these files, for example, `MRB_IVSYM(foo)` is converted to `<@! "@" "foo" !@>` and `mrb_define_module(mrb, "Foo")` is converted to `<@! "Foo" !@>`. 4. Scan the files created in step 3 and create `presym` and` presym.inc` files. The files created in step 2 should output all static symbols defined in Ruby sources, including local variables, so we can detect all presyms by just scanning C sources without scanning Ruby sources directly. Further, by this process, the files to be scanned becomes the same as the files to be compiled, so that there is no excess or deficiency. ## Related changes The following changes have been made in relation to realizing this feature. ### Allow build without presym It enables build without presym to achieve the "Build process: 1". This incorporates #5202, see its issue for details. Note that when presym is enabled, even adding a local variable to a Ruby source may change contents of presym and require recompilation of almost all C sources. This is inconvenient, especially during trial and error in development, but this feature is also useful because it does not cause this problem if presym is disabled. ### Automatically create build target for `mrbc` without presym The `mrbc` used in the "Build process: 1" will be built by automatically creating a build target for it. The build name is `SOURCE_BUILD_NAME/mrbc`. ### Constantize output of C struct format by `mrbc` To realizing the "Build process: 2", as mentioned above, symbol IDs are not output directly in C struct format output by `mrbc`. As a result, the output becomes constant regardless of the state of presym at the time of `mrbc` build, and it is possible to detect symbols of Ruby sources in the same way as other C sources. Note that `mrb_intern_lit` is used for symbols that do not become presym, but in this state, the corresponding element in the symbol array cannot be statically initialized, so it is initialized at run time (therefore, in this case, the `const` qualifier is not added to the symbol array). ### Specify arbitrary `mrbc` file To realizing the "Build process: 2", enabled to specify `mrbc` created by another build target or pre-built` mrbc`. Use `MRuby::Build#mrbcfile =` to specify it explicitly. You can omit the "Build process: 1" by specifying pre-built `mrbc`, and you can always use an optimized build to compile Ruby sources faster. I think changes that affect the output of `mrbc` are rare, so in many cases it helps to improve efficiency. With presym, the build will be a little slower due to more build steps, but this feature will improve it a bit. ### Create presym files for each build target This feature was proposed at #5194 and merged once, but was reverted in 5c205e6e due to problems especially with cross-compilation. It has been introduced again because this change solves the problem. The presym files will be created below. * `build/NAME/presym` * `build/NAME/include/mruby/presym.inc` ### Other changes * Because presym detection accuracy is greatly improved as mentioned above, `MRuby::Gem::Specification#cdump?` is set to true by default, and `disable_cdump` is added instead of `enable_cdump`. Also, support for gem specific presym files has been discontinued (https://github.com/mruby/mruby/issues/5151#issuecomment-730967232). * Previously, `mrbc` was automatically created for the `host` build, but it will not be created if the build target for `mrbc` mentioned above is automatically created. At this time, `mrbc` file of the `mrbc` build is copied to` bin/`. * Two types of `.d` files will be created, `.o.d` and `.i.d`. oThis is because if `.i` depends on `presym.inc`, the dependency will circulate, so the `.d` file cannot be shared. * Changed file created with `enable_cxx_exception` to `X-cxx.cxx` from `X.cxx` to use the mruby standard Rake rule. ### Note Almost all C sources will need to be recompiled if there are any changes to `persym.inc` (if not recompiled properly, it will often result in run-time error). If `gcc` toolchain is used, dependencies are resolved by the `.d` file, so it become automatically recompile target, but if not (e.g. MSVC), it is necessary to manually make it recompile target. Also, even if `gcc` toolchain is used, it may not become recompile target if external gems does not use the mruby standard Rake rule. In particular, if the standard rule is overwritten, such as https://github.com/mruby/mruby/pull/5112/files, `.d` file will not be read, so be careful.
2020-12-05Make it possible that `libmruby.a` is not createdKOBAYASHI Shuji
Previously, `libmruby.a` was created even if only `mruby-bin-mrbc` or` mruby-compiler` was specified for gem, but by specifying `disable_libmruby`, the creation of `libmruby.a` can be suppressed. ### Note The https://github.com/mruby/mruby/pull/5084#issuecomment-723521971 incompatibility seems to be difficult for users to avoid, so the original behavior has been restored. Therefore, if we need `mrbc` other than the `host` build, we need to explicitly specify `mruby-bin-mrbc` gem. Due to the above changes, `build_config/boxing.rb` etc. will not work, but I have added` mruby-bin-mrbc` to `default.gembox` to fix it. I don't think this change is a big deal because originally `mruby-compiler` was included.
2020-11-25Replace mere `enable_debug` by clearer `conf.enable_debug` [ci skip]Yukihiro "Matz" Matsumoto
2020-11-24Fix compiler errors from `MRB_NO_FLOAT`; #5185Yukihiro "Matz" Matsumoto
Also added `no-float.rb` target in `build_config`.
2020-11-23Use local variables instead of top level constants in `boxing.rb` [ci skip]KOBAYASHI Shuji
2020-11-22Remove `mrb_str_buf_new()` and `MRB_STR_BUF_MIN_SIZE`; close #5171Yukihiro "Matz" Matsumoto
2020-11-21Rename `MRB_{ENABLE,DISABLE}_` to `MRB_{USE,NO}_`; close #5163KOBAYASHI Shuji
| Previous Name | New Name | |------------------------------|-------------------------| | MRB_ENABLE_ALL_SYMBOLS | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_SYMBOLL_ALL | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_CXX_ABI | MRB_USE_CXX_ABI | | MRB_ENABLE_CXX_EXCEPTION | MRB_USE_CXX_EXCEPTION | | MRB_ENABLE_DEBUG_HOOK | MRB_USE_DEBUG_HOOK | | MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING | | MRB_DISABLE_STDIO | MRB_NO_STDIO | | ENABLE_LINENOISE | MRB_USE_LINENOISE | | ENABLE_READLINE | MRB_USE_READLINE | | DISABLE_MIRB_UNDERSCORE | MRB_NO_MIRB_UNDERSCORE | | DISABLE_GEMS | MRB_NO_GEMS | * `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed. * `MRB_` prefix is added to those without. * The previous names can also be used for compatibility.