summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-21 17:41:36 +0900
committerGitHub <[email protected]>2020-11-21 17:41:36 +0900
commita3221bf8cdab815744b0c71d1c84d02009f39da6 (patch)
tree4190a2d6fdfe950fdc8da3eff6b9ae4e21eb570e /lib
parent66d044ec3e8d9a3d242399a5ed5cb76bf02f6722 (diff)
parent3179944e8161362a6f5863621be265d331d89355 (diff)
downloadmruby-a3221bf8cdab815744b0c71d1c84d02009f39da6.tar.gz
mruby-a3221bf8cdab815744b0c71d1c84d02009f39da6.zip
Merge pull request #5164 from shuujii/automatically-enable-MRB_ENABLE_DEBUG_HOOK-if-mruby-bin-debugger-is-used
Automatically enable `MRB_ENABLE_DEBUG_HOOK` if `mruby-bin-debugger` is used
Diffstat (limited to 'lib')
-rw-r--r--lib/mruby/build.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb
index 59b5cd583..e553eb437 100644
--- a/lib/mruby/build.rb
+++ b/lib/mruby/build.rb
@@ -270,12 +270,14 @@ EOS
end
def define_rules
+ use_mrdb = @gems.find{|g| g.name == "mruby-bin-debugger"}
compilers.each do |compiler|
if respond_to?(:enable_gems?) && enable_gems?
compiler.defines -= %w(DISABLE_GEMS)
else
compiler.defines += %w(DISABLE_GEMS)
end
+ compiler.defines |= %w(MRB_ENABLE_DEBUG_HOOK) if use_mrdb
compiler.define_rules build_dir, File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
end
end