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
6b224282
Commit
6b224282
authored
8 years ago
by
Mike McQuaid
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1546 from MikeMcQuaid/llvm-clang-fixes
LLVM Clang fixes
parents
17109737
b9d0d771
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/Homebrew/development_tools.rb
+21
-14
21 additions, 14 deletions
Library/Homebrew/development_tools.rb
Library/Homebrew/shims/super/cc
+1
-3
1 addition, 3 deletions
Library/Homebrew/shims/super/cc
Library/Homebrew/version/null.rb
+4
-0
4 additions, 0 deletions
Library/Homebrew/version/null.rb
with
26 additions
and
17 deletions
Library/Homebrew/development_tools.rb
+
21
−
14
View file @
6b224282
...
...
@@ -42,54 +42,61 @@ class DevelopmentTools
end
def
gcc_40_build_version
@gcc_40_build_version
||=
@gcc_40_build_version
||=
begin
if
(
path
=
locate
(
"gcc-4.0"
))
&&
build_version
=
`
#{
path
}
--version 2>/dev/null`
[
/build (\d{4,})/
,
1
]
Version
.
new
build_version
else
Version
::
NULL
end
end
end
alias
gcc_4_0_build_version
gcc_40_build_version
def
gcc_42_build_version
@gcc_42_build_version
||=
begin
gcc
=
locate
(
"gcc-4.2"
)
||
HOMEBREW_PREFIX
.
join
(
"opt/apple-gcc42/bin/gcc-4.2"
)
if
gcc
.
exist?
&&
!
gcc
.
realpath
.
basename
.
to_s
.
start_with?
(
"llvm"
)
&&
build_version
=
`
#{
gcc
}
--version 2>/dev/null`
[
/build (\d{4,})/
,
1
]
Version
.
new
build_version
else
Version
::
NULL
end
@gcc_42_build_version
||=
begin
gcc
=
locate
(
"gcc-4.2"
)
||
HOMEBREW_PREFIX
.
join
(
"opt/apple-gcc42/bin/gcc-4.2"
)
if
gcc
.
exist?
&&
!
gcc
.
realpath
.
basename
.
to_s
.
start_with?
(
"llvm"
)
&&
build_version
=
`
#{
gcc
}
--version 2>/dev/null`
[
/build (\d{4,})/
,
1
]
Version
.
new
build_version
else
Version
::
NULL
end
end
end
alias
gcc_build_version
gcc_42_build_version
def
clang_version
@clang_version
||=
@clang_version
||=
begin
if
(
path
=
locate
(
"clang"
))
&&
build_version
=
`
#{
path
}
--version`
[
/(?:clang|LLVM) version (\d\.\d)/
,
1
]
Version
.
new
build_version
else
Version
::
NULL
end
end
end
def
clang_build_version
@clang_build_version
||=
@clang_build_version
||=
begin
if
(
path
=
locate
(
"clang"
))
&&
build_version
=
`
#{
path
}
--version`
[
/clang-(\d{2,})/
,
1
]
Version
.
new
build_version
else
Version
::
NULL
end
end
end
def
llvm_clang_build_version
@llvm_clang_build_version
||=
if
Tab
.
for_name
"llvm"
@llvm_clang_build_version
||=
begin
path
=
Formulary
.
factory
(
"llvm"
).
opt_prefix
/
"bin/clang"
`
#{
path
}
--version`
[
/clang version (\d\.\d\.\d)/
,
1
]
if
path
.
executable?
&&
build_version
=
`
#{
path
}
--version`
[
/clang version (\d\.\d\.\d)/
,
1
]
Version
.
new
build_version
else
Version
::
NULL
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/shims/super/cc
+
1
−
3
View file @
6b224282
...
...
@@ -156,7 +156,7 @@ class Cmd
/^-O[0-9zs]?
$/
, "-fast", "-no-cpp-precomp",
"-pedantic", "-pedantic-errors", "-Wno-long-double",
"-Wno-unused-but-set-variable"
when "-mno-fused-madd", "-fforce-addr", "-fno-defer-pop",
when
"-fopenmp", "-lgomp",
"-mno-fused-madd", "-fforce-addr", "-fno-defer-pop",
"-mno-dynamic-no-pic", "-fearly-inlining", /^-f(?:no-)?inline-functions-called-once/,
/^-finline-limit/, /^-f(?:no-)?check-new/, "-fno-delete-null-pointer-checks",
"-fcaller-saves", "-fthread-jumps", "-fno-reorder-blocks", "-fcse-skip-blocks",
...
...
@@ -165,8 +165,6 @@ class Cmd
"-fuse-linker-plugin", "-frounding-math"
# clang doesn't support these flags
args << arg unless tool =~ /^clang/
when "-fopenmp", "-lgomp"
args << arg if tool =~ /^llvm_clang/
when "--fast-math"
arg = "-ffast-math" if tool =~ /^clang/
args << arg
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/version/null.rb
+
4
−
0
View file @
6b224282
...
...
@@ -34,5 +34,9 @@ class Version
""
end
alias_method
:to_str
,
:to_s
def
inspect
"#<Version::NULL>"
.
freeze
end
end
.
new
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