Skip to content

Commit

Permalink
Merge pull request #16088 from Homebrew/revert-16062-bootsnap-relax
Browse files Browse the repository at this point in the history
Revert "standalone/bootsnap: relax restrictions"
  • Loading branch information
MikeMcQuaid committed Oct 5, 2023
2 parents a8494ba + 2ad5491 commit de575da
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Library/Homebrew/startup/bootsnap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de575da

Please sign in to comment.