Merge pull request #18636 from Homebrew/swift-dylib_id-fix

os/mac/keg_relocate: don't change Swift stdlib dylib IDs
This commit is contained in:
Bo Anderson 2024-10-25 21:21:01 +01:00 committed by GitHub
commit d0af2d4e11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,6 +141,9 @@ module OS
end
def dylib_id_for(file)
# Swift dylib IDs should be /usr/lib/swift
return file.dylib_id if file.dylib_id.start_with?("/usr/lib/swift/libswift")
# The new dylib ID should have the same basename as the old dylib ID, not
# the basename of the file itself.
basename = File.basename(file.dylib_id)