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
Mike McQuaid
3982950e61
rubocop --auto-correct all hash-rocket usage.
2016-09-17 16:14:13 +01:00
Mike McQuaid
569c80323b
hardware: add ARM detection from Linuxbrew.
2016-07-29 21:21:02 -06:00
Mike McQuaid
892a3239bc
hardware: more porting to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
11624b9a7d
hardware: move generic logic from linux. ( #454 )
2016-07-06 10:43:54 +01:00
Martin Afanasjew
7727c7764c
hardware: prettify config output on 6/8-core CPUs ( #313 )
2016-06-14 15:08:04 +02:00
Mike McQuaid
8d995e961f
Make hardware code cross-platform.
2016-05-08 16:51:22 +01:00
Mike McQuaid
ddb576b582
Add support for testing generic OS.
...
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.
2016-05-08 16:51:22 +01:00
BrewTestBot
13d544e11e
Core files style updates.
...
Closes Homebrew/homebrew#42354 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Jack Nagel
977981dcb9
Remove ivars from default Hardware::CPU methods
...
These methods are always overridden in the per-OS modules, so let's just
provide sensible defaults for documentation purposes.
2015-02-27 20:38:00 -05:00
Jack Nagel
1dc4412f69
Provide Hardware::CPU.feature?
2015-02-23 21:38:36 -05:00
Jack Nagel
6e92716642
Define Hardware::CPU.features on the base module
2015-02-23 21:38:36 -05:00
Jack Nagel
cb18b9e77e
Add Hardware::CPU.intel? and Hardware::CPU.ppc?
2013-11-26 20:23:19 -06:00
Jack Nagel
c511d7d2f4
Add OS.mac? and OS.linux?
2013-10-18 12:56:51 -05:00
Misty De Meo
ab633864d5
Mach: improve PPC arch detection
...
Also adds some reusable constants into the global Hardware::CPU
namespace, available on both OS X and Linux.
2013-08-15 22:46:56 -07:00
Jack Nagel
50db35e5d3
Use Hardware::CPU module
2013-06-14 10:34:17 -05:00
Jack Nagel
159b9d8e2d
Move oldest_cpu to Hardware
2013-06-06 16:02:27 -05:00
Jack Nagel
3be67f7252
Reorganize compat
2013-05-10 23:27:28 -05:00
Misty De Meo
2476801613
Hardware: separate out CPU values into CPU module
...
* 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>
2013-03-23 13:40:18 -05:00
Shaun Jackman
258d70028f
Portability fixes to run Homebrew on Linux systems
...
Closes Homebrew/homebrew#16344 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00
Misty De Meo
cf9e25cfa5
Add Ivy Bridge CPU family
...
Fixes Homebrew/homebrew#13434 .
2012-07-16 16:26:47 -05:00
Jack Nagel
ca71c038a1
Cache Hardware.is_64_bit?
...
IO#popen is called for each call to Hardware.is_64_bit?; this becomes
costly when it is repeatedly invoked. Luckily it is an invariant, so we
can store it in a class variable.
False is a valid value for this method, so the usual ||= idiom is not
applicable.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-02 01:10:21 -05:00
Austin Seipp
567711ed74
sandybridge hardware identifier for brew --config
...
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-07-05 09:38:41 -07:00
Adam Vandenberg
d8c2642b6d
Add MacOS.prefer_64_bit?
...
Moved snow_leopard_64? to compatibility and replaced it with
a function MacOS.prefer_64_bit?. This method is in a better
place and has a better name once Lion comes out.
Fixes Homebrew/homebrew#4710
2011-03-18 10:30:26 -07:00
Adam Vandenberg
1e5b23f2db
Define "snow_leopard_64?"
...
snow_leopard_64? (defined in Hardware) is a short-cut for:
MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-08-22 20:11:03 -07:00
listrophy
d7f19e7afb
Add 'Arrandale' for core i7 MBP
...
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-04-29 11:51:05 -07:00
Adam Vandenberg
7c158e2350
Fix universal builds on 32-bit CPUs.
2010-04-22 17:23:59 -07:00
Adam Vandenberg
a9b19f0255
Move license block to separate LICENSE file.
2010-03-01 11:41:24 -08:00
Adam Vandenberg
4fbcf13e65
Move some helper functions into Hardware
2009-11-19 14:03:06 -08:00
Ben Alpert
e339a2a73f
Add Hardware.is_64_bit? method
...
Closes Homebrew/homebrew#53
2009-09-24 16:30:26 -06:00
Max Howell
a12569699e
Fix some "GCC cannot create executables"
...
This regards Issue Homebrew/homebrew#30 .
Turns out -march=native isn't supported by Apple's GCC, but while investigating it I found they'd back ported the -march=core2 option, so we win anyway.
Logic reverted to how it was yesterday.
I moved the gcc options stuff back to brewkit.rb as we manipulate the cflags more later and it seemed bad form to split the logic for this area over two files.
Additionally the brew command exits immediately on powerpc now. Brewkit doesn't throw as theoretically it is a useful library file for other projects.
2009-09-03 22:39:49 +01:00