mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Pass args.cc
to Install
.
This commit is contained in:
parent
ca18a72673
commit
20bd4280ff
@ -144,8 +144,8 @@ module Homebrew
|
|||||||
def gist_logs
|
def gist_logs
|
||||||
gist_logs_args.parse
|
gist_logs_args.parse
|
||||||
|
|
||||||
perform_preinstall_checks(all_fatal: true)
|
Install.perform_preinstall_checks(all_fatal: true)
|
||||||
perform_build_from_source_checks(all_fatal: true)
|
Install.perform_build_from_source_checks(all_fatal: true)
|
||||||
gistify_logs(args.resolved_formulae.first)
|
gistify_logs(args.resolved_formulae.first)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -10,7 +10,6 @@ require "cli/parser"
|
|||||||
require "upgrade"
|
require "upgrade"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
extend Install
|
|
||||||
extend Search
|
extend Search
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
@ -256,7 +255,7 @@ module Homebrew
|
|||||||
|
|
||||||
return if formulae.empty?
|
return if formulae.empty?
|
||||||
|
|
||||||
perform_preinstall_checks
|
Install.perform_preinstall_checks(cc: args.cc)
|
||||||
|
|
||||||
formulae.each do |f|
|
formulae.each do |f|
|
||||||
Migrator.migrate_if_needed(f, force: args.force?)
|
Migrator.migrate_if_needed(f, force: args.force?)
|
||||||
|
@ -13,8 +13,6 @@ require "cask/macos"
|
|||||||
require "upgrade"
|
require "upgrade"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
extend Install
|
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
def reinstall_args
|
def reinstall_args
|
||||||
@ -61,7 +59,7 @@ module Homebrew
|
|||||||
|
|
||||||
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
|
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
|
||||||
|
|
||||||
perform_preinstall_checks
|
Install.perform_preinstall_checks
|
||||||
|
|
||||||
resolved_formulae, casks = args.resolved_formulae_casks
|
resolved_formulae, casks = args.resolved_formulae_casks
|
||||||
resolved_formulae.each do |f|
|
resolved_formulae.each do |f|
|
||||||
|
@ -9,8 +9,6 @@ require "cask/utils"
|
|||||||
require "cask/macos"
|
require "cask/macos"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
extend Install
|
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
def upgrade_args
|
def upgrade_args
|
||||||
@ -79,7 +77,7 @@ module Homebrew
|
|||||||
def upgrade_outdated_formulae(formulae)
|
def upgrade_outdated_formulae(formulae)
|
||||||
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
|
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
|
||||||
|
|
||||||
perform_preinstall_checks
|
Install.perform_preinstall_checks
|
||||||
|
|
||||||
if formulae.blank?
|
if formulae.blank?
|
||||||
outdated = Formula.installed.select do |f|
|
outdated = Formula.installed.select do |f|
|
||||||
|
@ -43,8 +43,8 @@ module Homebrew
|
|||||||
FileUtils.ln_sf ld_so, brew_ld_so
|
FileUtils.ln_sf ld_so, brew_ld_so
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform_preinstall_checks(all_fatal: false)
|
def perform_preinstall_checks(all_fatal: false, cc: nil)
|
||||||
generic_perform_preinstall_checks(all_fatal: all_fatal)
|
generic_perform_preinstall_checks(all_fatal: all_fatal, cc: cc)
|
||||||
symlink_ld_so
|
symlink_ld_so
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,6 +7,8 @@ require "development_tools"
|
|||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
module Install
|
module Install
|
||||||
|
module_function
|
||||||
|
|
||||||
def check_cpu
|
def check_cpu
|
||||||
return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
|
return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
|
||||||
|
|
||||||
@ -37,8 +39,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_cc_argv
|
def check_cc_argv(cc)
|
||||||
return unless (cc = args.cc)
|
return unless cc
|
||||||
|
|
||||||
@checks ||= Diagnostic::Checks.new
|
@checks ||= Diagnostic::Checks.new
|
||||||
opoo <<~EOS
|
opoo <<~EOS
|
||||||
@ -47,10 +49,10 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform_preinstall_checks(all_fatal: false)
|
def perform_preinstall_checks(all_fatal: false, cc: nil)
|
||||||
check_cpu
|
check_cpu
|
||||||
attempt_directory_creation
|
attempt_directory_creation
|
||||||
check_cc_argv
|
check_cc_argv(cc)
|
||||||
diagnostic_checks(:supported_configuration_checks, fatal: all_fatal)
|
diagnostic_checks(:supported_configuration_checks, fatal: all_fatal)
|
||||||
diagnostic_checks(:fatal_preinstall_checks)
|
diagnostic_checks(:fatal_preinstall_checks)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user