development_tools: make gcc_version public api
This commit is contained in:
parent
1c959c22ce
commit
08181692f3
@ -114,9 +114,9 @@ class DevelopmentTools
|
||||
|
||||
# Get the GCC version.
|
||||
#
|
||||
# @api internal
|
||||
# @api public
|
||||
sig { params(cc: String).returns(Version) }
|
||||
def gcc_version(cc)
|
||||
def gcc_version(cc = host_gcc_path.to_s)
|
||||
(@gcc_version ||= T.let({}, T.nilable(T::Hash[String, Version]))).fetch(cc) do
|
||||
path = HOMEBREW_PREFIX/"opt/#{CompilerSelector.preferred_gcc}/bin"/cc
|
||||
path = locate(cc) unless path.exist?
|
||||
|
Loading…
x
Reference in New Issue
Block a user