ruby-changes:64620
From: Nobuyoshi <ko1@a...>
Date: Sun, 27 Dec 2020 17:51:38 +0900 (JST)
Subject: [ruby-changes:64620] 366b58d7ca (master): Ignore objects from the "missing" directory
https://git.ruby-lang.org/ruby.git/commit/?id=366b58d7ca From 366b58d7ca19914d533a0bef51e51995e7876da7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 27 Dec 2020 14:05:24 +0900 Subject: Ignore objects from the "missing" directory diff --git a/tool/leaked-globals b/tool/leaked-globals index 4979155..0d8c3c4 100755 --- a/tool/leaked-globals +++ b/tool/leaked-globals @@ -18,8 +18,15 @@ count = 0 https://github.com/ruby/ruby/blob/trunk/tool/leaked-globals#L18 col = Colorize.new config_code = File.read(config) REPLACE = config_code.scan(/\bAC_(?:REPLACE|CHECK)_FUNCS?\((\w+)/).flatten -REPLACE << 'memcmp' if /\bAC_FUNC_MEMCMP\b/ =~ config_code +# REPLACE << 'memcmp' if /\bAC_FUNC_MEMCMP\b/ =~ config_code REPLACE.push('main', 'DllMain') +missing = File.dirname(config) + "/missing/" +ARGV.reject! do |n| + unless (src = Dir.glob(missing + File.basename(n, ".*") + ".[cS]")).empty? + puts "Ignore #{n} because of #{src.map {|s| File.basename(s)}.join(', ')} under missing" + true + end +end print "Checking leaked global symbols..." STDOUT.flush IO.foreach("|#{NM} -Pgp #{ARGV.join(' ')}") do |line| -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/