81 Commits

Author SHA1 Message Date
Nazar
521fdcb506
Wording
Co-authored-by: Alexander Bayandin <alexander@bayandin.dev>
2023-06-24 11:09:28 +01:00
Tokarak
55bdbabaae brew style --fix 2023-06-20 23:48:10 +01:00
Nazar
87158acfe0
Improve logic (code review)
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-06-20 23:44:25 +01:00
Tokarak
40aa41929f More cpus in rust_optimisation_flags 2023-06-17 12:14:21 +01:00
Tokarak
73c339d82b Style changes 2023-06-17 10:51:48 +01:00
Tokarak
9a19f5bcd2 Refactor to use oldest_cpu 2023-06-17 10:38:32 +01:00
Tokarak
d4bfbb1d02 Remove FIXMEs 2023-06-13 19:32:18 +01:00
Tokarak
066a88855b Add rustflags_target_cpu method 2023-06-13 19:22:12 +01:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Bo Anderson
bca9eb05d1
dev-cmd/unbottled: simulate target tag 2022-11-16 00:07:31 +00:00
Adrian Ho
4b560e11e7 Enable Linux AArch64 support
Register system loader and arch tag for proper builds and bottling.
2022-09-29 16:33:44 +08:00
Mike McQuaid
30a65342e8
Deprecate, disable, delete code for Homebrew 3.2.0
Do the usual deprecation, disable, delete dance for Homebrew 3.2.0.
2021-06-17 11:34:32 +01:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
Mike McQuaid
cdaeee03c4
GitHub Packages cleanup
- `download_strategy`: only request image index JSON for downloading
  the manifest for the tab
- use a shared `OS` constant for the version of `glibc` we use in CI
- fix `skoepeo` typo
- ensure that blank hash values are deleted (again) rather than just
  `nil` ones
- use a shared `Hardware::CPU` constant for oldest CPU we're
  supporting/using on Intel 64-bit
- re-add comment to `software_spec`
2021-04-05 14:58:17 +01:00
Bo Anderson
b670ab1c7b Deprecate additional arch functions 2021-02-02 16:19:24 +00:00
Jonathan Chang
095798be40 hardware: optimize Big Sur bottles for Ivy Bridge 2020-12-23 00:00:01 +11:00
Mike McQuaid
566ebf2a98
Revert "Revert "Fix :arm64_big_sur bottle ordering.""
This reverts commit 399cc56d034a3314f428683b7872b4d67063be9a.
2020-12-08 16:28:45 +00:00
Francois-Xavier Coudert
399cc56d03 Revert "Fix :arm64_big_sur bottle ordering."
This reverts commit 66d1b929a5b134ee93caf9237e7074a195c1b523.
2020-12-08 13:00:22 +01:00
Mike McQuaid
66d1b929a5
Fix :arm64_big_sur bottle ordering.
This wasn't being parsed correctly so was being put below the Linux
bottle which is less readable, less intuitive and will cause a bunch
of merge conflicts.
2020-12-07 12:09:29 +00:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Mike McQuaid
5afff3f3aa
Handle macOS Homebrew on ARM
- 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
2020-11-12 17:06:47 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
74d3f0b153 hardware: rename rosetta method. 2020-09-01 14:52:37 +01:00
Misty De Meo
d9135c5a57 CPU: add ability to check for Rosetta
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.
2020-09-01 14:52:37 +01:00
Markus Reiter
33c138751e Refactor and document Hardware. 2020-08-23 04:19:46 +02:00
Fred Emmott
10feb68128
Add support for -march=sandybridge
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.
2020-07-10 10:32:30 -07:00
Claudia
374c734d9b
Make Hardware.oldest_cpu depend on architecture
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
2020-07-08 20:59:10 +02:00
Trung Le
d6c80c8671 Update Hardware::CPU.oldest_family with ppc64 2020-05-01 23:21:28 +10:00
Trung Le
3df97b20d5 Add PowerPC64 CPU
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-04-30 23:37:45 +10:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Shaun Jackman
c20044b43f Fix Hardware::CPU.arm? for aarch64 2019-02-21 21:15:01 -08:00
Mike McQuaid
28fa8a7c97
version: add CPU tests.
Add a new API inspired by discussion in
https://github.com/Homebrew/homebrew-core/pull/36435 to query if a given
CPU option is supported by a version of macOS.
2019-01-28 19:31:21 +00:00
Mike McQuaid
1aa8ad09e2
Deprecate macOS versions below Mavericks
And remove all dead/unneeded code.
2019-01-27 12:27:47 +00:00
Mike McQuaid
96207c05d3
Merge pull request #5506 from MikeMcQuaid/no-penryn
hardware: no special penryn CFLAGS.
2019-01-08 19:40:03 +00:00
Mike McQuaid
b1e60f9c76
hardware: no special penryn CFLAGS.
These are the same as `core2` (at least for `gcc`).

Fixes #5502.
2019-01-08 19:14:29 +00:00
Shaun Jackman
23ea066a0f Use -march=native for non-bottle source builds [Linux] 2019-01-08 09:39:37 -08:00
Mike McQuaid
a2f93fe018
hardware: tweak macOS CFLAGS.
- High Sierra and Sierra support Penryn CPUs.
- `-march` implies the relevant `-msse*` flags.
2018-12-22 11:41:49 +00:00
Mike McQuaid
04fbdce3bb
hardware: use Nehalem flags on >= Sierra.
See https://en.wikipedia.org/wiki/MacOS_Sierra#System_requirements.
2018-12-20 20:10:54 +00:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
Shaun Jackman
4addff3b2b determine_optflags: Default is -march=native 2018-10-03 11:41:39 -07:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Dominyk Tiller
92c6e72a4a
hardware: add dodeca-core for 2018 MBPs 2018-07-13 10:50:30 +01:00
Shaun Jackman
5ca7cd3071 oldest_cpu: Bottling architecture of ARM is armv6
armv6 is the oldest supported 32-bit ARM architecture
armv8-a is the oldest 64-bit ARM architecture.

See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
and https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
2018-05-15 17:20:51 -07:00
Markus Reiter
b91628a614 Refactor Hardware::CPU spec. 2018-04-20 19:11:22 +02:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Shaun Jackman
0ce7a74c58 Hardware::CPU: Implement OS-agnostic methods 2017-12-01 15:18:35 -08:00
Misty De Meo
d7ff53fa1d Hardware: add helper to determine if an executable can be run 2017-04-15 22:59:55 +08:00
Shaun Jackman
ecb2246ab0 OPTIMIZATION_FLAGS: Use -march=native for Penryn
Use -march=native for Penryn as for other systems rather than
-march=core2 -msse4.1.
2017-03-13 15:54:20 -07:00
Mike McQuaid
d0f1fa668c hardware: use march=native for generic module.
This matches Linux where this behaviour was original imported from.
2017-03-11 08:40:48 +00:00