Support GCC 10
This commit is contained in:
parent
a4eb7e73f4
commit
420fcfca0e
@ -2,8 +2,8 @@
|
||||
|
||||
# @private
|
||||
module CompilerConstants
|
||||
GNU_GCC_VERSIONS = %w[4.9 5 6 7 8 9].freeze
|
||||
GNU_GCC_REGEXP = /^gcc-(4\.9|[5-9])$/.freeze
|
||||
GNU_GCC_VERSIONS = %w[4.9 5 6 7 8 9 10].freeze
|
||||
GNU_GCC_REGEXP = /^gcc-(4\.9|[5-9]|10)$/.freeze
|
||||
COMPILER_SYMBOL_MAP = {
|
||||
"gcc" => :gcc,
|
||||
"clang" => :clang,
|
||||
|
||||
@ -78,7 +78,7 @@ class DevelopmentTools
|
||||
path = HOMEBREW_PREFIX/"opt/gcc/bin"/cc
|
||||
path = locate(cc) unless path.exist?
|
||||
version = if path &&
|
||||
build_version = `#{path} --version`[/gcc(?:(?:-\d(?:\.\d)?)? \(.+\))? (\d\.\d\.\d)/, 1]
|
||||
build_version = `#{path} --version`[/gcc(?:(?:-\d(?:\.\d)?)? \(.+\))? (\d+\.\d\.\d)/, 1]
|
||||
Version.new build_version
|
||||
else
|
||||
Version::NULL
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user