- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel
When running within an Intel terminal, `uname -m` and friends return Intel-based
values for compatibility. An Intel shell will also prefer to launch Intel slices of
programs unless the program is ARM-only.
It's an open question how Homebrew should manage running in Intel mode. Should it
continue to behave as though the Mac is Intel-based, like it does now? Should it
recognize it's ARM-based? Either way, it's useful for us to be able to tell whether
the Mac is running under Rosetta or whether it's a real Intel Mac.
HHVM's been building with this (or equivalent predecessor patches); it
gets us a 20x speedup on real-world workloads, at the cost of slightly
worse compatibility.
This doesn't change the default, just makes it available as an explicit
choice.
Starting with Xcode 12 Beta 2, builds that used to work on Apple Silicon
now break due to `Hardware#oldest_cpu` returning `:nehalem` [1].
This commit is the first in a series of improvements to
`Hardware#oldest_cpu`. It resolves the Xcode 12 Beta 2 issue for now.
[1]: https://github.com/Homebrew/brew/issues/7857#issuecomment-655536261
If the environment variable HOMEBREW_TEST_GENERIC_OS is set ensure that
neither Mac nor Linux-specific code is loaded. This allows easier
testing of cross-platform code on OS X and will make it easier to port
Homebrew to platforms other than OS X and Linux.
* CPU functions now exist in Hardware::CPU
* Added compatibility functions in compat/hardware_compat.rb
* Names are less specific to Mac hardware, e.g. CPU.family instead of
Hardware.intel_family
* Hardware::CPU.family works for both Intel and PowerPC
* New helper methods on CPU, like .sse4? and .altivec?
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>