Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
35a271e9
Commit
35a271e9
authored
5 years ago
by
Jonathan Chang
Browse files
Options
Downloads
Patches
Plain Diff
audit: check Accelerate linkage for core formulae
parent
0265ab75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/extend/os/mac/formula_cellar_checks.rb
+21
-0
21 additions, 0 deletions
Library/Homebrew/extend/os/mac/formula_cellar_checks.rb
with
21 additions
and
0 deletions
Library/Homebrew/extend/os/mac/formula_cellar_checks.rb
+
21
−
0
View file @
35a271e9
...
...
@@ -48,6 +48,26 @@ module FormulaCellarChecks
EOS
end
def
check_accelerate_framework_links
return
unless
@core_tap
return
unless
formula
.
prefix
.
directory?
keg
=
Keg
.
new
(
formula
.
prefix
)
system_accelerate
=
keg
.
mach_o_files
.
select
do
|
obj
|
dlls
=
obj
.
dynamically_linked_libraries
dlls
.
any?
{
|
dll
|
%r{^/System/Library/Frameworks/Accelerate.framework}
.
match
dll
}
end
return
if
system_accelerate
.
empty?
<<~
EOS
object files were linked against system Accelerate
These object files were linked against the outdated system Accelerate framework.
Core tap formulae should link against OpenBLAS instead.
Adding `depends_on "openblas"` to the formula may help.
#{
system_accelerate
*
"
\n
"
}
EOS
end
def
check_python_framework_links
(
lib
)
python_modules
=
Pathname
.
glob
lib
/
"python*/site-packages/**/*.so"
framework_links
=
python_modules
.
select
do
|
obj
|
...
...
@@ -95,6 +115,7 @@ module FormulaCellarChecks
generic_audit_installed
problem_if_output
(
check_shadowed_headers
)
problem_if_output
(
check_openssl_links
)
problem_if_output
(
check_accelerate_framework_links
)
problem_if_output
(
check_python_framework_links
(
formula
.
lib
))
check_linkage
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment