From fb5e8ab6d5fa9b7ca08c7b66ac8038940534db70 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 25 Jun 2020 17:58:20 +0900 Subject: Provide a new build target `host-gprof` that enables profiling. --- target/host-gprof.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 target/host-gprof.rb diff --git a/target/host-gprof.rb b/target/host-gprof.rb new file mode 100644 index 000000000..c8a2f3b13 --- /dev/null +++ b/target/host-gprof.rb @@ -0,0 +1,15 @@ +MRuby::Build.new do |conf| + # load specific toolchain settings + toolchain :gcc + + # include the GEM box + conf.gembox 'full-core' + + conf.cc.defines = %w(MRB_METHOD_CACHE) + conf.cc.flags << '-pg' + conf.linker.flags << '-pg' + + # Turn on `enable_debug` for better debugging + enable_debug + conf.enable_test +end -- cgit v1.2.3