Allow build settings to define if benchmarks are covered or not
Each build target can be explicitly disabled from benchmarking with `MRuby::Build#disable_benchmark`.
Also, the build target "host", which was previously excluded, is now included in the benchmark.
MODIFY
lib/mruby/build.rb
lib/mruby/build.rb
@@ -123,6 +123,7 @@ module MRuby
@enable_test = false
@enable_lock = true
@enable_presym = true
+ @enable_benchmark = true
@mrbcfile_external = false
@internal = internal
@toolchains = []
@@ -232,6 +233,14 @@ module MRuby
@cxx_abi_enabled = true
end
+ def benchmark_enabled?
+ @enable_benchmark
+ end
+
+ def disable_benchmark
+ @enable_benchmark = false
+ end
+
def compile_as_cxx(src, cxx_src = nil, obj = nil, includes = [])
#
# If `cxx_src` is specified, this method behaves the same as before as

MODIFY
tasks/benchmark.rake
tasks/benchmark.rake
@@ -51,7 +51,7 @@ end
MRuby.each_target do |target|
- next if target.name == 'host' || target.internal?
+ next if !target.benchmark_enabled? || target.internal?
mruby_bin = "#{target.build_dir}/bin/mruby"
bm_files.each do |bm_file|

Allow build settings to define if benchmarks are covered or not

Each build target can be explicitly disabled from benchmarking with `MRuby::Build#disable_benchmark`.

Also, the build target "host", which was previously excluded, is now included in the benchmark.