From 529eadd6cc1b889a95e45fa8478a90163f538ba8 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Fri, 25 Oct 2024 20:55:21 +0100 Subject: [PATCH] os/mac/keg_relocate: don't change Swift stdlib dylib IDs --- Library/Homebrew/extend/os/mac/keg_relocate.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index 31494e2dd2..69cd8a2d9e 100644 --- a/Library/Homebrew/extend/os/mac/keg_relocate.rb +++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb @@ -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)