diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-25 17:58:20 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:21 +0900 |
| commit | fb5e8ab6d5fa9b7ca08c7b66ac8038940534db70 (patch) | |
| tree | a0dcc395309f59c0c36e5cc278e8b06910f4d4f0 | |
| parent | 11955ca1a18f2613c62c8cd48c2d8ac0a155dc73 (diff) | |
| download | mruby-fb5e8ab6d5fa9b7ca08c7b66ac8038940534db70.tar.gz mruby-fb5e8ab6d5fa9b7ca08c7b66ac8038940534db70.zip | |
Provide a new build target `host-gprof` that enables profiling.
| -rw-r--r-- | target/host-gprof.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 |
