Skip to content

Commit

Permalink
Merge pull request #13570 from carlocab/report-system-framework-linkage
Browse files Browse the repository at this point in the history
linkage_checker: report linkage with system frameworks
  • Loading branch information
carlocab authored Jul 19, 2022
2 parents f96b9ef + e61bcb4 commit 020c93a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Library/Homebrew/linkage_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def check_dylibs(rebuild_cache:)
# In macOS Big Sur and later, system libraries do not exist on-disk and instead exist in a cache.
# If dlopen finds the dylib, then the linkage is not broken.
@system_dylibs << dylib
else
elsif !system_framework?(dylib)
@broken_dylibs << dylib
end
else
Expand Down Expand Up @@ -306,11 +306,13 @@ def sort_by_formula_full_name!(arr)
def harmless_broken_link?(dylib)
# libgcc_s_* is referenced by programs that use the Java Service Wrapper,
# and is harmless on x86(_64) machines
return true if [
[
"/usr/lib/libgcc_s_ppc64.1.dylib",
"/opt/local/lib/libgcc/libgcc_s.1.dylib",
].include?(dylib)
end

def system_framework?(dylib)
dylib.start_with?("/System/Library/Frameworks/")
end

Expand Down

0 comments on commit 020c93a

Please sign in to comment.