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
fd031f25
Commit
fd031f25
authored
10 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Add predicate methods for compiler shim configuration
parent
60452a52
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/ENV/4.3/cc
+29
-8
29 additions, 8 deletions
Library/ENV/4.3/cc
with
29 additions
and
8 deletions
Library/ENV/4.3/cc
+
29
−
8
View file @
fd031f25
...
...
@@ -84,7 +84,8 @@ class Cmd
# software uses gcc -v (wrongly) to sniff the GCC version.
return
@args
.
dup
end
if
!
cccfg?
(
"O"
)
||
tool
==
"ld"
||
configure?
if
!
refurbish_args?
||
tool
==
"ld"
||
configure?
args
=
@args
.
dup
else
args
=
refurbished_args
...
...
@@ -128,13 +129,13 @@ class Cmd
loop
do
case
arg
=
enum
.
next
when
"-arch"
if
cccfg?
(
"K"
)
if
permit_arch_flags?
args
<<
arg
<<
enum
.
next
else
enum
.
next
end
when
"-m32"
,
"-m64"
args
<<
arg
if
cccfg?
(
"K"
)
args
<<
arg
if
permit_arch_flags?
when
/^-Xarch_/
refurbished
=
refurbish_arg
(
enum
.
next
,
enum
)
unless
refurbished
.
empty?
...
...
@@ -205,7 +206,7 @@ class Cmd
def
cflags
args
=
[]
return
args
unless
cccfg?
'O'
or
configure?
return
args
unless
refurbish_args?
||
configure?
args
<<
'-pipe'
args
<<
'-w'
unless
configure?
...
...
@@ -217,9 +218,9 @@ class Cmd
def
cxxflags
args
=
cflags
args
<<
'
-std=c++11
'
if
c
ccfg?
'x'
args
<<
'
-stdlib=libc++
'
if
cccfg?
'g'
args
<<
'
-stdlib=libstdc++
'
if
cccfg?
'h'
args
<<
"
-std=c++11
"
if
c
xx11?
args
<<
"
-stdlib=libc++
"
if
libcxx?
args
<<
"
-stdlib=libstdc++
"
if
libstdcxx?
args
end
...
...
@@ -276,7 +277,7 @@ class Cmd
end
def
make_fuss?
cccfg?
'O'
and
not
configure?
refurbish_args?
&&
!
configure?
end
def
configure?
...
...
@@ -288,6 +289,26 @@ class Cmd
flags
.
split
(
''
).
all?
{
|
c
|
ENV
[
'HOMEBREW_CCCFG'
].
include?
c
}
if
ENV
[
'HOMEBREW_CCCFG'
]
end
def
refurbish_args?
cccfg?
(
"O"
)
end
def
cxx11?
cccfg?
(
"x"
)
end
def
libcxx?
cccfg?
(
"g"
)
end
def
libstdcxx?
cccfg?
(
"h"
)
end
def
permit_arch_flags?
cccfg?
(
"K"
)
end
def
canonical_path
(
path
)
path
=
Pathname
.
new
(
path
)
path
=
path
.
realpath
if
path
.
exist?
...
...
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