Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
18757c8f
Commit
18757c8f
authored
Nov 22, 2016
by
Tomasz Dąbrowski
Committed by
Yukihiro "Matz" Matsumoto
Nov 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Different method of compiling C as C++ (-x c++)
parent
00e61212
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
include/mruby/common.h
include/mruby/common.h
+5
-0
tasks/mruby_build.rake
tasks/mruby_build.rake
+5
-0
No files found.
include/mruby/common.h
View file @
18757c8f
...
...
@@ -9,8 +9,13 @@
#ifdef __cplusplus
#ifdef MRB_ENABLE_CXX_EXCEPTION
#define MRB_BEGIN_DECL
#define MRB_END_DECL
#else
# define MRB_BEGIN_DECL extern "C" {
# define MRB_END_DECL }
#endif
#else
/** Start declarations in C mode */
# define MRB_BEGIN_DECL
...
...
tasks/mruby_build.rake
View file @
18757c8f
...
...
@@ -120,6 +120,7 @@ module MRuby
def
enable_cxx_abi
return
if
@cxx_exception_disabled
or
@cxx_abi_enabled
compilers
.
each
{
|
c
|
c
.
defines
+=
%w(MRB_ENABLE_CXX_EXCEPTION)
}
compilers
.
each
{
|
c
|
c
.
flags
<<
'-x c++'
}
linker
.
command
=
cxx
.
command
if
toolchains
.
find
{
|
v
|
v
==
'gcc'
}
@cxx_abi_enabled
=
true
end
...
...
@@ -135,9 +136,13 @@ module MRuby
#define __STDC_CONSTANT_MACROS
#define __STDC_LIMIT_MACROS
#ifndef MRB_ENABLE_CXX_EXCEPTION
extern "C" {
#endif
#include "
#{
src
}
"
#ifndef MRB_ENABLE_CXX_EXCEPTION
}
#endif
#{
src
==
"
#{
MRUBY_ROOT
}
/src/error.c"
?
'mrb_int mrb_jmpbuf::jmpbuf_id = 0;'
:
''
}
EOS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment