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.
This commit is contained in:
dearblue
2022-03-06 15:35:05 +09:00
parent 1f0d265a83
commit 267dd15767
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -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
+1 -1
View File
@@ -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|