diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-02-28 23:27:13 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-02-28 23:27:13 +0900 |
| commit | 1a1f834adeb243c5938604eb826c65d1f0efede0 (patch) | |
| tree | 280fc60eea3abb4ab6604b2be2c097de7e5a1245 /doc | |
| parent | dc56bbecc81b5d04d3bf9ab337f4ebf7024f654f (diff) | |
| download | mruby-1a1f834adeb243c5938604eb826c65d1f0efede0.tar.gz mruby-1a1f834adeb243c5938604eb826c65d1f0efede0.zip | |
Compile C files by C compiler when C++ files mixed.
ref #3267 #3470
By this commit, mruby do not use C++ ABI mode unless
you specify explicitly. It compiles C files by C
compilers, with C++ exception enabled when it sees
C++ files in your configured mrbgems.
I haven't tried visualcpp, so please submit an issue
if you see any problem with C++ gems on Windows.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guides/compile.md | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/guides/compile.md b/doc/guides/compile.md index d07b4f65f..9ca61c6fd 100644 --- a/doc/guides/compile.md +++ b/doc/guides/compile.md @@ -242,9 +242,19 @@ conf.enable_bintest ### 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. + +There are two levels of C++ exception handling. The one is +C++ exception enabled (but still C files are compiled by C +compiler), and the other is C++ ABI mode where all files are +compiled by C++ compiler. + +When you mix C++ code, C++ exception would be enabled automatically. +If you need to enable C++ exception explicitly add the following: +```ruby +conf.enable_cxx_exception +``` + If you need to enable C++ ABI mode explicitly add the following: ```ruby conf.enable_cxx_abi @@ -252,8 +262,10 @@ conf.enable_cxx_abi #### C++ exception disabling. + If you need to force C++ exception disable -(For example using a compiler option to disable C++ exception) +(For example using a compiler option to disable C++ exception), +but still want to use C++ ABI mode, add following: ```ruby conf.disable_cxx_exception |
