Revert "Revert "standalone/bootsnap: relax restrictions""

This commit is contained in:
Mike McQuaid 2023-10-05 17:08:55 +01:00
parent 8c91152eb6
commit f6bfb8d757
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -5,15 +5,9 @@
# rubocop:disable Rails # rubocop:disable Rails
homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && !ENV["HOMEBREW_BOOTSNAP"].nil? homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && !ENV["HOMEBREW_BOOTSNAP"].nil?
# portable ruby doesn't play nice with bootsnap # we need some development tools to build bootsnap native code
homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/")
homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"] homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"]
# Apple Silicon doesn't play nice with bootsnap File.directory?("/Applications/Xcode.app") || File.directory?("/Library/Developer/CommandLineTools")
ENV["HOMEBREW_PROCESSOR"] == "Intel" &&
# we need some development tools to build bootsnap native code
(File.directory?("/Applications/Xcode.app") || File.directory?("/Library/Developer/CommandLineTools"))
else else
File.executable?("/usr/bin/clang") || File.executable?("/usr/bin/gcc") File.executable?("/usr/bin/clang") || File.executable?("/usr/bin/gcc")
end end