aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compilers.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-02 21:57:52 -0500
committerJack Nagel2014-07-02 21:58:43 -0500
commit32d84377d54ab1c7de897cd19fc1df458c622ae8 (patch)
tree08e1fe27ee5dd46347a62610824d09d248ba08ca /Library/Homebrew/compilers.rb
parent729ee39994faf25803d50e33dec0620dae5d964e (diff)
downloadbrew-32d84377d54ab1c7de897cd19fc1df458c622ae8.tar.bz2
Move constants so we don't have to load all of ENV to get them
Diffstat (limited to 'Library/Homebrew/compilers.rb')
-rw-r--r--Library/Homebrew/compilers.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb
index e60322060..2d9bb908f 100644
--- a/Library/Homebrew/compilers.rb
+++ b/Library/Homebrew/compilers.rb
@@ -1,3 +1,8 @@
+module CompilerConstants
+ GNU_GCC_VERSIONS = 3..9
+ GNU_GCC_REGEXP = /gcc-(4\.[3-9])/
+end
+
class Compiler < Struct.new(:name, :version, :priority)
# The major version for non-Apple compilers. Used to indicate a compiler
# series; for instance, if the version is 4.8.2, it would return "4.8".
@@ -93,7 +98,7 @@ class CompilerSelector
end
# non-Apple GCC 4.x
- SharedEnvExtension::GNU_GCC_VERSIONS.each do |v|
+ CompilerConstants::GNU_GCC_VERSIONS.each do |v|
name = "gcc-4.#{v}"
version = @versions.non_apple_gcc_version(name)
unless version.nil?