| Age | Commit message (Collapse) | Author |
|
* Output `GEN` log for generated files
* `MRBC` log is outputted one for each `mrbc` execution
#### Before this patch:
```console
CC src/array.c -> build/host/src/array.o
(snip)
GEN mrblib/*.rb -> build/host/mrblib/mrblib.c
MRBC mrblib/00class.rb
MRBC mrblib/10error.rb
(snip)
CC mrbgems/mruby-time/src/time.c -> build/host/mrbgems/mruby-time/src/time.o
MRBC mrbgems/mruby-time/mrblib/time.rb
(snip)
CC mrbgems/mruby-socket/test/sockettest.c -> build/host/mrbgems/mruby-socket/test/sockettest.o
MRBC mrbgems/mruby-socket/test/addrinfo.rb
MRBC mrbgems/mruby-socket/test/basicsocket.rb
(snip)
```
#### After this patch:
```console
GEN build/presym
GEN build/presym.inc
CC src/array.c -> build/host/src/array.o
(snip)
GEN mrblib/*.rb -> build/host/mrblib/mrblib.c
MRBC mrblib/00class.rb
mrblib/10error.rb
(snip)
CC mrbgems/mruby-time/src/time.c -> build/host/mrbgems/mruby-time/src/time.o
GEN build/host/mrbgems/mruby-time/gem_init.c
MRBC mrbgems/mruby-time/mrblib/time.rb
(snip)
CC mrbgems/mruby-socket/test/sockettest.c -> build/host/mrbgems/mruby-socket/test/sockettest.o
GEN build/host/mrbgems/mruby-socket/gem_test.c
MRBC mrbgems/mruby-socket/test/addrinfo.rb
MRBC mrbgems/mruby-socket/test/basicsocket.rb
(snip)
```
|
|
Because `_pp` is originally defined in `lib/mruby/core_ext.rb`, other global
functions are moved to the file.
|
|
| 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.
|
|
|
|
|
|
|
|
The writers seem to be unnecessary because `MRuby::Build#enable_{bin,}test`
are used from the beginning.
|
|
|
|
|
|
ref: https://github.com/mruby/mruby/pull/4959#discussion_r402086196
Compiles twice because it falls back to `build.filename(command)` when
`command` fails. This process was added at 9968af4 to support `ccache gcc`
etc. At that time, it seems that it was necessary because
`build.filename(command)` quoted the whole `command`, but now it does not
quote, so we can just run `build.filename(command)`.
### Example
```console
$ echo 1 > src/a.c
$ rake -v
```
#### Before this patch:
```console
(snip)
gcc -std=gnu99 -g -O3 -Wall -Wundef -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wwrite-strings -I"/mruby/mruby/include" -MMD -o "/mruby/mruby/build/host/src/a.o" -c "/mruby/mruby/src/a.c"
/mruby/mruby/src/a.c:1:1: error: expected identifier or '('
1
^
1 error generated.
gcc -std=gnu99 -g -O3 -Wall -Wundef -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wwrite-strings -I"/mruby/mruby/include" -MMD -o "/mruby/mruby/build/host/src/a.o" -c "/mruby/mruby/src/a.c"
/mruby/mruby/src/a.c:1:1: error: expected identifier or '('
1
^
1 error generated.
rake aborted!
(snip)
```
#### After this patch:
```console
(snip)
gcc -std=gnu99 -g -O3 -Wall -Wundef -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wwrite-strings -I"/mruby/mruby/include" -MMD -o "/mruby/mruby/build/host/src/a.o" -c "/mruby/mruby/src/a.c"
/mruby/mruby/src/a.c:1:1: error: expected identifier or '('
1
^
1 error generated.
rake aborted!
(snip)
```
|
|
|
|
|
|
If you confirm the gem is cdump safe, add `spec.enable_cdump` in
`mrbgem.rake` file. Some external gems e.g. `mruby-mgem-template` do
not work with cdump.
|
|
|
|
|
|
Always use `mrblib` and 'src` for directory names.
|
|
It was relative from the directory of the build configuration file, but
the document says it's relative from `MRUBY_ROOT`. When the default
configuration file was `MRUBY_ROOT/build_config.rb`, it was OK for most
of the cases.
|
|
In addition, update the documents referring `build_config.rb` which is
no longer used. The new `build_config.rb` describes the new configuration
structure in the comment.
|
|
|
|
* In explanation of mruby, the expression `build_config.rb` is frequently
used including official documents, so I think that it will not make sense
if the file is no longer used.
* The `MRUBY_TARGET` mechanism seems to have little improvement, so I don't
think it should be changed to avoid unnecessary confusion.
* `MRUBY_TARGET` and `MRuby.targets` represent somewhat different things,
so using the same term "target" is a bit confusing.
The mechanism that can be written short when using a file under
`build_config` (renamed from `target`) directory remains
(`build_config/${MRUBY_CONFIG}.rb` is used if the path specified
in `MRUBY_CONFIG` doesn't exist).
|
|
Files under `test/t` and `mrbgem/*/test` are for tests, not for actual
execution. So symbols in those files need not to be pre-allocated. This
change slightly reduce the memory consumption.
|
|
|
|
|
|
|
|
|
|
So that you can omit `host` target. Now `host-debug` works.
|
|
|
|
You don't have to define explicit `host` build target any more.
|
|
|
|
|
|
Because some changes have been overridden.
|
|
|
|
You have to specify `TARGET` to specify a configuration, e.g.
```
rake TARGET=host-debug all test
```
When you port `mruby` to a new configuration:
1. copy an existing configuration under `target` directory
2. modify the new configuration file
3. build using the new configuration
4. send PR if you please
|
|
*.d format is version-independent
|
|
As pointed out by @shuujii on https://github.com/mruby/mruby/pull/5079 ,
multi-path in single-line could be appear even with older-gcc or clang.
|
|
|
|
Before this commit:
$ rake
...
$ rm build/host/src/gc.o
$ rake
rake aborted!
Don't know how to build task '/home/foo/mruby/build/host/src/gc.o' (See the list of available tasks with `rake --tasks`)
...
After this commit:
$ rake
...
$ rm build/host/src/gc.o
$ rake
CC src/gc.c -> build/host/src/gc.o
...
With gcc 9.3.0 on Ubuntu 20.04, build/host/src/array.d looks like:
/build/host/src/array.o: /src/array.c \
/include/mruby.h /include/mrbconf.h \
/include/mruby/common.h \
...
/include/mruby/range.h \
/src/value_array.h
and it has been parsed to:
[
# /src/array.c missing
"/include/mruby.h /include/mrbconf.h", # incorrectly parsed
"/include/mruby/common.h",
...
"/src/value_array.h",
]
After this change, *.d will be parsed correctly.
[
"/src/array.c",
"/include/mruby.h",
"/include/mrbconf.h",
"/include/mruby/common.h",
...
"/src/value_array.h",
]
|
|
Fix take over file scope variables with `mruby` and `mirb` command
|
|
Since we made our opcode byte based, we need no endian option (`-e`
and `-E`) to `mrbc`.
|
|
Because some changes have been overridden.
|
|
|
|
Printing them in sorted order makes it easier to find the desired gem.
But it has come to completely ignore the dependency.
|
|
UNIX format.
|
|
Validate windows by Dir testing
|
|
To prevent infinite loop on errors; reported by @shuujii
|
|
|
|
Modified the build to quote filenames so that it builds when files have spaces
|
|
|
|
The incompatibility that the commands of `FileUtils` origin output verbose
by default due to the changes in d8a5163b and 26e6e75b is also fixed.
|
|
- Respect `--verbose(-v)` and `--dry-run(-n)` options.
- Silence warnings to keyword arguments on Ruby 2.7.
|