[前][次][番号順一覧][スレッド一覧]

ruby-changes:67663

From: Nobuyoshi <ko1@a...>
Date: Wed, 8 Sep 2021 19:10:33 +0900 (JST)
Subject: [ruby-changes:67663] 0b9242ffac (master): [Misc #18153] Install debug symbol files/directories by the option

https://git.ruby-lang.org/ruby.git/commit/?id=0b9242ffac

From 0b9242ffacd92fe02e640efb8640041e6838cb8b Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 8 Sep 2021 18:50:46 +0900
Subject: [Misc #18153] Install debug symbol files/directories by the option

---
 tool/rbinstall.rb | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 305287c..2f70f46 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -51,6 +51,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L51
   $dir_mode = nil
   $script_mode = nil
   $strip = false
+  $debug_symbols = nil
   $cmdtype = (if File::ALT_SEPARATOR == '\\'
                 File.exist?("rubystub.exe") ? 'exe' : 'cmd'
               end)
@@ -92,6 +93,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L93
   opt.on('--cmd-type=TYPE', %w[cmd plain]) {|cmd| $cmdtype = (cmd unless cmd == 'plain')}
   opt.on('--[no-]strip') {|strip| $strip = strip}
   opt.on('--gnumake') {gnumake = true}
+  opt.on('--debug-symbols=SUFFIX', /\w+/) {|name| $debug_symbols = ".#{name}"}
 
   opt.order!(argv) do |v|
     case v
@@ -678,6 +680,20 @@ install?(:dbg, :nodefault) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L680
   end
   install File.join(srcdir, "misc/lldb_cruby.py"), File.join(rubylibdir, "lldb_cruby.py")
   install File.join(srcdir, ".gdbinit"), File.join(rubylibdir, "gdbinit")
+  if $debug_symbols
+    {
+      ruby_install_name => bindir,
+      rubyw_install_name => bindir,
+      goruby_install_name => bindir,
+      dll => libdir,
+    }.each do |src, dest|
+      next if src.empty?
+      src += $debug_symbols
+      if File.directory?(src)
+        install_recursive src, File.join(dest, src)
+      end
+    end
+  end
 end
 
 module RbInstall
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]