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
381255ad
Commit
381255ad
authored
11 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Assign this inline
parent
3252f9a2
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/ENV.rb
+8
-11
8 additions, 11 deletions
Library/Homebrew/extend/ENV.rb
with
8 additions
and
11 deletions
Library/Homebrew/extend/ENV.rb
+
8
−
11
View file @
381255ad
...
...
@@ -181,16 +181,15 @@ module HomebrewEnvExtension
@compiler
=
:clang
end
def
remove_macosxsdk
v
=
MacOS
.
version
def
remove_macosxsdk
v
ersion
=
MacOS
.
version
# Clear all lib and include dirs from CFLAGS, CPPFLAGS, LDFLAGS that were
# previously added by macosxsdk
v
=
v
.
to_s
v
ersion
=
version
.
to_s
remove_from_cflags
(
/ ?-mmacosx-version-min=10\.\d/
)
delete
(
'MACOSX_DEPLOYMENT_TARGET'
)
delete
(
'CPATH'
)
remove
'LDFLAGS'
,
"-L
#{
HOMEBREW_PREFIX
}
/lib"
sdk
=
MacOS
.
sdk_path
(
v
)
unless
sdk
.
nil?
or
MacOS
::
CLT
.
installed?
unless
(
sdk
=
MacOS
.
sdk_path
(
version
)).
nil?
or
MacOS
::
CLT
.
installed?
delete
(
'SDKROOT'
)
remove_from_cflags
"-isysroot
#{
sdk
}
"
remove
'CPPFLAGS'
,
"-isysroot
#{
sdk
}
"
...
...
@@ -205,18 +204,16 @@ module HomebrewEnvExtension
end
end
def
macosxsdk
v
=
MacOS
.
version
def
macosxsdk
v
ersion
=
MacOS
.
version
return
unless
MACOS
# Sets all needed lib and include dirs to CFLAGS, CPPFLAGS, LDFLAGS.
remove_macosxsdk
# Allow cool style of ENV.macosxsdk 10.8 here (no "" :)
v
=
v
.
to_s
append_to_cflags
(
"-mmacosx-version-min=
#{
v
}
"
)
self
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
v
version
=
version
.
to_s
append_to_cflags
(
"-mmacosx-version-min=
#{
version
}
"
)
self
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
version
self
[
'CPATH'
]
=
"
#{
HOMEBREW_PREFIX
}
/include"
prepend
'LDFLAGS'
,
"-L
#{
HOMEBREW_PREFIX
}
/lib"
sdk
=
MacOS
.
sdk_path
(
v
)
unless
sdk
.
nil?
or
MacOS
::
CLT
.
installed?
unless
(
sdk
=
MacOS
.
sdk_path
(
version
)).
nil?
or
MacOS
::
CLT
.
installed?
# Extra setup to support Xcode 4.3+ without CLT.
self
[
'SDKROOT'
]
=
sdk
# Tell clang/gcc where system include's are:
...
...
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