diff options
| author | Mike McQuaid | 2016-11-09 12:29:58 +0000 |
|---|---|---|
| committer | GitHub | 2016-11-09 12:29:58 +0000 |
| commit | 848c4461afef34cb2bf3712a8ea7c3f4582f0d96 (patch) | |
| tree | 5e3243c8554ccac25bd6b2c7b43a61003ea42e7e | |
| parent | 1fb7d0fa5702f21d35ed3831419daa6f3ea24473 (diff) | |
| download | brew-848c4461afef34cb2bf3712a8ea7c3f4582f0d96.tar.bz2 | |
Revert "os/mac: MachO.dynamically_linked_libraries filtering."
| -rw-r--r-- | Library/Homebrew/os/mac/linkage_checker.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac/mach.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac/pathname.rb | 2 |
3 files changed, 5 insertions, 10 deletions
diff --git a/Library/Homebrew/os/mac/linkage_checker.rb b/Library/Homebrew/os/mac/linkage_checker.rb index e72227fc4..e014e3816 100644 --- a/Library/Homebrew/os/mac/linkage_checker.rb +++ b/Library/Homebrew/os/mac/linkage_checker.rb @@ -23,10 +23,7 @@ class LinkageChecker @keg.find do |file| next if file.symlink? || file.directory? next unless file.dylib? || file.mach_o_executable? || file.mach_o_bundle? - - # weakly loaded dylibs may not actually exist on disk, so skip them - # when checking for broken linkage - file.dynamically_linked_libraries(except: :LC_LOAD_WEAK_DYLIB).each do |dylib| + file.dynamically_linked_libraries.each do |dylib| @reverse_links[dylib] << file if dylib.start_with? "@" @variable_dylibs << dylib diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index 4113a0601..07598a23d 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -1,7 +1,7 @@ require "vendor/macho/macho" require "os/mac/architecture_list" -module MachOShim +module MachO # @private def macho @macho ||= begin @@ -51,10 +51,8 @@ module MachOShim end end - def dynamically_linked_libraries(except: :none) - lcs = macho.dylib_load_commands.reject { |lc| lc.type == except } - - lcs.map(&:name).map(&:to_s) + def dynamically_linked_libraries + macho.linked_dylibs end def dylib_id diff --git a/Library/Homebrew/os/mac/pathname.rb b/Library/Homebrew/os/mac/pathname.rb index 5fd59e1e7..9b65d7ac0 100644 --- a/Library/Homebrew/os/mac/pathname.rb +++ b/Library/Homebrew/os/mac/pathname.rb @@ -1,5 +1,5 @@ require "os/mac/mach" class Pathname - include MachOShim + include MachO end |
