Changeset 331 for EcnlProtoTool/trunk/mruby-1.3.0/tasks/mruby_build.rake
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- Location:
- EcnlProtoTool/trunk/mruby-1.3.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/mruby-1.3.0/tasks/mruby_build.rake
r321 r331 84 84 @gems, @libmruby = MRuby::Gem::List.new, [] 85 85 @build_mrbtest_lib_only = false 86 @cxx_exception_enabled = false 87 @cxx_exception_disabled = false 86 88 @cxx_abi_enabled = false 87 @cxx_exception_disabled = false88 89 @enable_bintest = false 89 90 @enable_test = false … … 111 112 112 113 def disable_cxx_exception 114 if @cxx_exception_enabled or @cxx_abi_enabled 115 raise "cxx_exception already enabled" 116 end 113 117 @cxx_exception_disabled = true 118 end 119 120 def enable_cxx_exception 121 return if @cxx_exception_enabled 122 return if @cxx_abi_enabled 123 if @cxx_exception_disabled 124 raise "cxx_exception disabled" 125 end 126 @cxx_exception_enabled = true 127 compilers.each { |c| 128 c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) 129 c.flags << c.cxx_exception_flag 130 } 131 linker.command = cxx.command if toolchains.find { |v| v == 'gcc' } 132 end 133 134 def cxx_exception_enabled? 135 @cxx_exception_enabled 114 136 end 115 137 … … 119 141 120 142 def enable_cxx_abi 121 return if @cxx_exception_disabled or @cxx_abi_enabled 122 compilers.each { |c| c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) } 143 return if @cxx_abi_enabled 144 if @cxx_exception_enabled 145 raise "cxx_exception already enabled" 146 end 147 compilers.each { |c| 148 c.defines += %w(MRB_ENABLE_CXX_EXCEPTION MRB_ENABLE_CXX_ABI) 149 c.flags << c.cxx_compile_flag 150 } 151 compilers.each { |c| c.flags << c.cxx_compile_flag } 123 152 linker.command = cxx.command if toolchains.find { |v| v == 'gcc' } 124 153 @cxx_abi_enabled = true … … 136 165 #define __STDC_LIMIT_MACROS 137 166 167 #ifndef MRB_ENABLE_CXX_ABI 138 168 extern "C" { 169 #endif 139 170 #include "#{src}" 171 #ifndef MRB_ENABLE_CXX_ABI 140 172 } 141 142 #{src == "#{MRUBY_ROOT}/src/error.c"? 'mrb_int mrb_jmpbuf::jmpbuf_id = 0;' : ''} 173 #endif 143 174 EOS 144 175 end
Note:
See TracChangeset
for help on using the changeset viewer.