diff options
| author | take_cheeze <[email protected]> | 2014-03-05 03:08:06 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-03-05 03:08:06 +0900 |
| commit | 1029be3cd862a96e2b624df64aa46f05c7957863 (patch) | |
| tree | 22e166329555d986d8886a22fb58348b531f50ad | |
| parent | 47d1701fb4d94c8710c4045372c6aa9dd4f5e909 (diff) | |
| download | mruby-1029be3cd862a96e2b624df64aa46f05c7957863.tar.gz mruby-1029be3cd862a96e2b624df64aa46f05c7957863.zip | |
update compilation notes
| -rw-r--r-- | doc/compile/README.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/compile/README.md b/doc/compile/README.md index cb8bdfc32..42bcdb6b4 100644 --- a/doc/compile/README.md +++ b/doc/compile/README.md @@ -183,6 +183,39 @@ If you want mrbtest.a only, You should set ```conf.build_mrbtest_lib_only``` conf.build_mrbtest_lib_only +### Bintest + +Tests for mrbgem tools using CRuby. +To have bintests place *.rb scripts to ```bintest/``` directory of mrbgems. +See ```mruby-bin-*/bintest/*.rb``` if you need examples. +If you want a temporary files use `tempfile` module of CRuby instead of ```/tmp/```. + +You can enable it with following: + + conf.enable_bintest = true + +### C++ ABI + +mruby can use C++ exception to raise exception internally. +It is called C++ ABI mode. +By using C++ exception it can release C++ stack object correctly. +Whenever you mix C++ code C++ ABI mode would be enabled automatically. +If you need to enable C++ ABI mode explicity add the following: + + conf.enable_cxx_abi + +### Debugging mode + +To enable debugging mode add the following: + + conf.enable_debug + +When debugging mode is enabled +* Macro ```MRB_DEBUG``` would be defined. + * Which means ```mrb_assert()``` macro is enabled. +* Debug information of irep would be generated by ```mrbc```. + * Because ```-g``` flag would be added to ```mrbc``` runner. + * You can have better backtrace of mruby scripts with this. ## Cross-Compilation @@ -202,6 +235,20 @@ like this: All configuration options of ```MRuby::Build``` can also be used in ```MRuby::CrossBuild```. +### Mrbtest in Cross-Compilation + +In cross compilation, you can run ```mrbtest``` on emulator if +you have it by changing configuration of test runner. + + conf.test_runner do |t| + t.command = ... # set emulator. this value must be non nil or false + t.flags = ... # set flags of emulator + + def t.run(bin) # override `run` if you need to change the behavior of it + ... # `bin` is the full path of mrbtest + end + end + ## Build process During the build process the directory *build* will be created in the |
