mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
716102fff3
The `debug` build target (`MRB_GC_STRESS` is enabled) on CI have been compiled but not tested so far. However, I think testing with `MRB_GC_STRESS` is effective (in fact, I found #4907 bug). Therefore, I integrated `debug` and `full-debug` build targets to enable `MRB_GC_STRESS` testing. Testing with `MRB_GC_STRESS` takes a little time, but compiling takes more time, so CI execution time does not increase due to decrease of build target.
59 lines
1.5 KiB
Ruby
59 lines
1.5 KiB
Ruby
MRuby::Build.new('debug') do |conf|
|
|
toolchain :gcc
|
|
enable_debug
|
|
|
|
# include all core GEMs
|
|
conf.gembox 'full-core'
|
|
conf.cc.flags += %w(-Werror=declaration-after-statement -fsanitize=address,undefined)
|
|
conf.linker.flags += %W(-fsanitize=address,undefined)
|
|
conf.compilers.each do |c|
|
|
c.defines += %w(MRB_GC_STRESS MRB_GC_FIXED_ARENA MRB_METHOD_CACHE)
|
|
end
|
|
|
|
build_mrbc_exec
|
|
end
|
|
|
|
MRuby::Build.new('full-debug') do |conf|
|
|
toolchain :gcc
|
|
enable_debug
|
|
|
|
# include all core GEMs
|
|
conf.gembox 'full-core'
|
|
conf.cc.flags += %w(-Werror=declaration-after-statement -fsanitize=address,undefined)
|
|
conf.linker.flags += %W(-fsanitize=address,undefined)
|
|
conf.cc.defines += %w(MRB_GC_STRESS MRB_METHOD_CACHE MRB_ENABLE_DEBUG_HOOK)
|
|
|
|
conf.enable_test
|
|
end
|
|
|
|
MRuby::Build.new do |conf|
|
|
toolchain :gcc
|
|
|
|
# include all core GEMs
|
|
conf.gembox 'full-core'
|
|
conf.cc.flags += %w(-Werror=declaration-after-statement -fsanitize=address,undefined)
|
|
conf.linker.flags += %W(-fsanitize=address,undefined)
|
|
conf.compilers.each do |c|
|
|
c.defines += %w(MRB_GC_FIXED_ARENA)
|
|
end
|
|
conf.enable_bintest
|
|
conf.enable_test
|
|
end
|
|
|
|
MRuby::Build.new('cxx_abi') do |conf|
|
|
toolchain :gcc
|
|
|
|
conf.gembox 'full-core'
|
|
conf.cc.flags += %w(-fpermissive -fsanitize=address,undefined)
|
|
conf.linker.flags += %W(-fsanitize=address,undefined)
|
|
conf.compilers.each do |c|
|
|
c.defines += %w(MRB_GC_FIXED_ARENA)
|
|
end
|
|
conf.enable_bintest
|
|
conf.enable_test
|
|
|
|
enable_cxx_abi
|
|
|
|
build_mrbc_exec
|
|
end
|