Merge pull request #16088 from Homebrew/revert-16062-bootsnap-relax

Revert "standalone/bootsnap: relax restrictions"
This commit is contained in:
Mike McQuaid 2023-10-05 08:43:31 +01:00 committed by GitHub
commit de575da014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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