123 Commits

Author SHA1 Message Date
Markus Reiter
0424940496 Add types for ENV extensions. 2020-11-23 02:06:37 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
e3646c9b4e Remove unneeded back-references. 2020-09-19 02:03:56 +02:00
Markus Reiter
276c570c16 Pass individual args explicitly to ENV extensions. 2020-07-28 02:52:45 +02:00
Markus Reiter
25b3632c4c Pass args to ENV instead of using global args. 2020-07-25 03:57:43 +02:00
Bo Anderson
3717815ade ENV/std: fix error when using older/no clang
Fixes #7482.
2020-05-02 13:33:32 +01:00
Bo Anderson
df47668113 ENV/std: conditionally apply AES-NI workaround 2020-04-12 14:50:49 +01:00
Bo Anderson
757cc24f7e ENV/std: restore original make_jobs return type 2020-04-08 20:31:04 +01: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
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04: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
170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Claudia
a72af2c8a6
Disable cop for #set_cpu_flags, #set_cpu_cflags
In `extend/ENV/std.rb`, the methods `set_cpu_flags` and
`set_cpu_cflags` have been violating the `Naming/AccessorMethodName`
cop.

A recent modification in #7e13b3749 woke up the cop. That means we’re
likely dealing with legacy code here, predating the introduction of
RuboCop into Homebrew.

This commit disables the cop for either method. I believe refactoring
wouldn’t currently be worth the effort, especially given that
`#set_cpu_cflags` is mostly called without arguments.
2019-01-08 08:13:25 +01:00
Mike McQuaid
7e13b37495
ENV: default CFLAGS to bottle values.
This reduces the deviation in compilation flags on a given OS between
users and between bottling/not bottling to provide a consistent
behaviour for debugging and support.
2019-01-06 21:27:15 +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
Mike McQuaid
a2febc8971
Revert "std: use HOMEBREW_ARCH env var on Linux" 2018-09-06 09:16:13 +01:00
Caleb Xu
90c25bf913 std: use HOMEBREW_ARCH env var on Linux
Unlike macOS, Linux installations can be installed/deployed on a
variety of hardware. The HOMEBREW_ARCH environment variable
allows the end user to set a custom -march=... option for the
compiler. If the variable is not set, it defaults to "native".

This only applies on Linux; on macOS, behavior remains unchanged.
2018-09-05 16:06:11 -04:00
Mike McQuaid
14364bbaee extend/ENV: support CX11 for LLVM Clang.
Fix some checks for `:clang` which should match for either `:clang` or
`:llvm_clang`. Note that's not every check.
2018-07-05 20:15:57 +01:00
Mike McQuaid
9b1bd5f45a system_config: don’t output std/superenv vars. 2018-04-02 09:40:39 +01:00
Mike McQuaid
f72aba548d ENV/std: fully extend from HOMEBREW_PATH.
Rather than just re-adding HOMEBREW_PREFIX/bin if it's missing re-add
everything from HOMEBREW_PATH. This works well with or without
environment filtering being enabled but with environment filtering it
ensures that ENV/std just builds on the original user environment.
2017-10-29 13:41:51 +00:00
Mike McQuaid
cf5fdeef1d Rubocop: manual rule fixes. 2017-09-24 21:23:59 +01:00
Mike McQuaid
7a0aff1080 Autocorrect Rubocop Style/PerlBackrefs. 2017-06-10 20:23:20 +03:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d Revert "Fix operator spacing." 2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b Fix operator spacing. 2017-05-31 19:53:41 +02:00
Bob W. Hogg
e2c707d8b1 Stdenv: Add ENV.libxml2 and ENV.x11 for Linux
Add ENV.libxml2 primarily for the use of test do blocks.
Add a dummy ENV.x11 function.

See Linuxbrew/brew#356 and Linuxbrew/brew#382
2017-05-30 10:37:26 -07:00
Markus Reiter
4d5d6a65e3 Rename PATH#validate to PATH#existing. 2017-04-30 21:11:28 +02:00
Markus Reiter
314483f75c Remove Array#to_path_s. 2017-04-30 21:11:27 +02:00
Markus Reiter
3e4fe279b0 Use to_path_s for determine_pkg_config_libdir. 2017-04-30 21:11:27 +02:00
Mike McQuaid
45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Mike McQuaid
e50102d91e ENV: deprecate old methods.
These should have been deprecated long ago but we didn’t really have
the necessary framework to do so.
2016-12-30 20:20:13 +00:00
Markus Reiter
84b2276fd8 Use guard clauses. 2016-11-13 23:00:47 +01:00
Markus Reiter
6c6a4c9fa7 RuboCop: Style/AccessorMethodName 2016-09-24 19:28:26 +02:00
Markus Reiter
58e36c7319 Fix Style/GuardClause. 2016-09-24 12:24:35 +02:00
Markus Reiter
e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Markus Reiter
fe2d51e0b9 Fix Style/IfUnlessModifier. 2016-09-23 15:30:07 +02:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
c3dab72e37 extend/ENV/std: fix Rubocop warnings. 2016-09-13 07:57:04 +01:00
Mike McQuaid
498e81c9fc stdenv: port to generic OS. (#456) 2016-07-12 11:39:39 +01:00
msbit
01e8e180a8 ENV: mark gcc-6 as supporting C++11 (#349)
Add SharedEnvExtension#gcc_with_cxx11_support? to centralise the
logic for checking whether a compiler is known to support C++11.

Update logic to accept GCC 4.8 and above (including 6). Thereby also
address oversight in #163 where support for GCC 6 was added without
updating the C++11 compiler whitelist.

Add tests for Superenv#cxx11.

Closes #346.
2016-06-16 14:15:28 +02:00
Mike McQuaid
375efe0945 Remove LLVM-GCC support. (#252)
At this point it's never a good compiler to use so let's just remove it.
2016-05-22 09:40:08 +01:00
Mike McQuaid
e316cc9296 Make development tools code cross-platform. 2016-05-08 16:51:22 +01:00
Misty De Meo
da643d942e Explicitly list -arch in LDFLAGS on Leopard 2016-04-22 22:37:21 -07:00
Misty De Meo
967fa41e41 Set -faltivec in CFLAGS on Tiger
Setting -mcpu and -mtune on Tiger with gcc-4.2 exposes a bug in one of the
system headers, causing certain builds to fail. This can be fixed by
adding -faltivec to CFLAGS.

See: http://trac.macports.org/ticket/34213
2016-04-22 22:37:21 -07:00
Misty De Meo
35385e8c59 stdenv: stop setting ACLOCAL_PATH 2016-04-21 09:36:30 -07:00
Xu Cheng
ce7b32cec8 add HOMEBREW_ENV_PATH internal variable
`Library/ENV` like `Library/Homebrew` is part of Homebrew basecode. It
should be able to be accessed during the `brew tests`.

By adding HOMEBREW_ENV_PATH variable, we allow test suit to locate these
codes.
2016-03-21 19:07:38 +08:00
Tim D. Smith
fe37cc5271 Revert "Avoid constructing paths by string interpolation"
This reverts commit 8c7f3d859e8f715b6c63e4fe75e7a636aee4167f.
2016-03-19 19:14:50 +08:00