diagnostic: check if Xcode needs CLT installed.
Require the CLT on all but the latest version of macOS to avoid the continuous workarounds for SDK weirdness.
This commit is contained in:
parent
889fc81906
commit
cd0db51343
@ -19,6 +19,7 @@ module Homebrew
|
||||
%w[
|
||||
check_xcode_minimum_version
|
||||
check_clt_minimum_version
|
||||
check_if_xcode_needs_clt_installed
|
||||
].freeze
|
||||
end
|
||||
|
||||
@ -124,6 +125,15 @@ module Homebrew
|
||||
EOS
|
||||
end
|
||||
|
||||
def check_if_xcode_needs_clt_installed
|
||||
return unless MacOS::Xcode.needs_clt_installed?
|
||||
|
||||
<<~EOS
|
||||
Xcode alone is not sufficient on #{MacOS.version.pretty_name}.
|
||||
#{DevelopmentTools.installation_instructions}
|
||||
EOS
|
||||
end
|
||||
|
||||
def check_for_osx_gcc_installer
|
||||
return unless MacOS.version < "10.7" || ((MacOS::Xcode.version || "0") > "4.1")
|
||||
return unless DevelopmentTools.clang_version == "2.1"
|
||||
|
||||
@ -31,16 +31,25 @@ module OS
|
||||
@version = nil
|
||||
end
|
||||
|
||||
def prerelease?
|
||||
# TODO: bump version when new OS is released
|
||||
version >= "10.14"
|
||||
def latest_sdk_version
|
||||
# TODO: bump version when new Xcode macOS SDK is released
|
||||
Version.new "10.13"
|
||||
end
|
||||
|
||||
def latest_stable_version
|
||||
# TODO: bump version when new macOS is released
|
||||
Version.new "10.13"
|
||||
end
|
||||
|
||||
def outdated_release?
|
||||
# TODO: bump version when new OS is released
|
||||
# TODO: bump version when new macOS is released
|
||||
version < "10.11"
|
||||
end
|
||||
|
||||
def prerelease?
|
||||
version > latest_stable_version
|
||||
end
|
||||
|
||||
def cat
|
||||
version.to_sym
|
||||
end
|
||||
|
||||
@ -40,6 +40,15 @@ module OS
|
||||
version < minimum_version
|
||||
end
|
||||
|
||||
def latest_sdk_version?
|
||||
OS::Mac.version == OS::Mac.latest_sdk_version
|
||||
end
|
||||
|
||||
def needs_clt_installed?
|
||||
return false if latest_sdk_version?
|
||||
without_clt?
|
||||
end
|
||||
|
||||
def outdated?
|
||||
return false unless installed?
|
||||
version < latest_version
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user