keg: Skip relocation when dylib ID/install name doesn't change.

This commit is contained in:
William Woodruff 2017-03-12 12:29:35 -04:00
parent 5d9215b211
commit 0dda8a13f1
No known key found for this signature in database
GPG Key ID: 85AE00C504833B3C

View File

@ -1,5 +1,6 @@
class Keg
def change_dylib_id(id, file)
return if file.dylib_id == id
@require_relocation = true
puts "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" if ARGV.debug?
MachO::Tools.change_dylib_id(file, id, strict: false)
@ -13,6 +14,7 @@ class Keg
end
def change_install_name(old, new, file)
return if old == new
@require_relocation = true
puts "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug?
MachO::Tools.change_install_name(file, old, new, strict: false)