Implement linkage for Linux

This commit is contained in:
Shaun Jackman 2017-12-01 16:43:00 -08:00
parent e5847b652f
commit d79c5ade1a
3 changed files with 7 additions and 1 deletions

View File

@ -470,6 +470,10 @@ class Pathname
end
}
end
def mach_o_bundle?
false
end
end
require "extend/os/pathname"

View File

@ -23,7 +23,7 @@ class LinkageChecker
def check_dylibs
@keg.find do |file|
next if file.symlink? || file.directory?
next unless file.dylib? || file.mach_o_executable? || file.mach_o_bundle?
next unless file.dylib? || file.binary_executable? || file.mach_o_bundle?
# weakly loaded dylibs may not actually exist on disk, so skip them
# when checking for broken linkage

View File

@ -103,6 +103,8 @@ module MachOShim
mach_data.any? { |m| m.fetch(:type) == :executable }
end
alias binary_executable? mach_o_executable?
# @private
def mach_o_bundle?
mach_data.any? { |m| m.fetch(:type) == :bundle }