File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 # Gets set by the VS command prompts.
55 if ENV [ 'VisualStudioVersion' ]
66 toolchain :visualcpp
7+ #elsif `uname` =~ /Darwin/
8+ #toolchain :clang
79 else
810 toolchain :gcc
911 end
1012
1113 enable_debug
14+ enable_cxx_abi
1215
1316 # Use mrbgems
1417 # conf.gem 'examples/mrbgems/ruby_extension_example'
2225 # include the default GEMs
2326 conf . gembox 'default'
2427
28+ conf . enable_bintest = true
29+
30+ conf . cc . flags = [ 'gcc' ] + conf . cc . flags # [conf.cc.command] + conf.cc.flags
31+ conf . cc . command = 'ccache'
32+ conf . cc . flags += %w[ -O0 -Wall -Wextra -Wno-parentheses-equality -Wdeclaration-after-statement -Werror=declaration-after-statement ]
33+
34+ conf . cxx . flags = [ conf . cxx . command ] + conf . cxx . flags
35+ conf . cxx . command = 'ccache'
36+ conf . cxx . flags += %w[ -O0 -Wall -Wextra -Wno-parentheses-equality -Werror-declaration-after-statement ]
37+
38+ conf . linker . command = 'clang++'
39+
40+ conf . cc . defines << 'MRB_GC_FIXED_ARENA' # conf.enable_mrbconf :gc_fixed_arena
41+ # conf.gem "#{MRUBY_ROOT}/mruby-uv"
42+ conf . gem "#{ MRUBY_ROOT } /mruby-sharedlib"
43+ # conf.gem "#{MRUBY_ROOT}/mruby-onig-regexp"
44+ conf . gem :core => 'mruby-bin-strip'
45+
2546 # C compiler settings
2647 # conf.cc do |cc|
2748 # cc.command = ENV['CC'] || 'gcc'
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ MRuby.each_target do
1616 file src => "#{ current_dir } /#{ v } .c" do |t |
1717 File . open ( t . name , 'w' ) do |f |
1818 f . write <<EOS
19+ #define __STDC_CONSTANT_MACROS
20+ #define __STDC_LIMIT_MACROS
21+
1922extern "C" {
2023#include "#{ MRUBY_ROOT } /#{ t . prerequisites . first } "
2124}
You can’t perform that action at this time.
0 commit comments