| Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
With this change, if the checkout fails, it will stop with an error.
The purpose is to avoid deleting working branch history when
developing gem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|