Skip to content

Commit

Permalink
Revert "Revert "standalone/bootsnap: relax restrictions""
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Oct 5, 2023
1 parent 8c91152 commit f6bfb8d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Library/Homebrew/startup/bootsnap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@
# rubocop:disable Rails
homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && !ENV["HOMEBREW_BOOTSNAP"].nil?

# portable ruby doesn't play nice with bootsnap

homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/")

# we need some development tools to build bootsnap native code
homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"]
# 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"))
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 f6bfb8d

Please sign in to comment.