Do not build from source on ARM unless explicitly requested

This commit is contained in:
Francois-Xavier Coudert 2020-12-12 00:10:34 +01:00 committed by Mike McQuaid
parent 8520316ead
commit 4db1c1a00f
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -231,6 +231,14 @@ class FormulaInstaller
raise CannotInstallFormulaError, "--force-bottle passed but #{formula.full_name} has no bottle!"
end
if Hardware::CPU.arm? && !pour_bottle? && !formula.bottle_unneeded? && !build_from_source? && !build_bottle? && !formula.bottle_disabled?
# During the first stage of ARM support, we bail out unless there is a bottle or the user specifically asked to build from source
onoe "There is no prebuilt bottle available for #{formula.full_name} on ARM macOS yet"
onoe "You can try to install it from source with the --build-from-source flag (or -s)"
onoe "However, this means we can offer no support."
raise CannotInstallFormulaError, "no bottle is available for #{formula.full_name} on ARM macOS yet"
end
type, reason = DeprecateDisable.deprecate_disable_info formula
if type.present?