non_apple_gcc_version: Use preferred_gcc
Check HOMEBREW_PREFIX/"opt/#{CompilerSelector.preferred_gcc}/bin/
This commit is contained in:
parent
3bcd919a70
commit
e615dc4fe6
@ -76,7 +76,7 @@ class DevelopmentTools
|
|||||||
|
|
||||||
def non_apple_gcc_version(cc)
|
def non_apple_gcc_version(cc)
|
||||||
(@non_apple_gcc_version ||= {}).fetch(cc) do
|
(@non_apple_gcc_version ||= {}).fetch(cc) do
|
||||||
path = HOMEBREW_PREFIX/"opt/gcc/bin"/cc
|
path = HOMEBREW_PREFIX/"opt/#{CompilerSelector.preferred_gcc}/bin"/cc
|
||||||
path = locate(cc) unless path.exist?
|
path = locate(cc) unless path.exist?
|
||||||
version = if path &&
|
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]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user