Rationale: our arg refurbishment is normally only turned on when
called via the `make` wrapper, for compatibility reasons. However,
there are numberous places we'd like this to be turned on elsewhere,
like software that builds via `python setup.py` where bad flags from
the system python can be pulled in.
This helper appends 'O' to CCCFG, which enables refurbishment for
all calls of the compiler shims.
This method is for internal use only. It is unsuitable for use in
formulae, which should use install_symlink to create relative symlinks.
Thus callers are required to pass a Pathname, not a string, and we can
remove this conditional.
Further, if src is not absolute, then src.relative_path_from(dirname)
will fail. All callers currently pass absolute pathnames. Therefore we
don't need to call expand_path when printing it.
Turns out that this doesn't really work at all. `brew install` _never_
reuses options in the first place, and using this option with `brew
upgrade` results in some nasty corner cases in passing options to
dependencies.
Previously, with nested arrays, the Symbol#to_proc would iterate over
the first item in the nested array instead of the array itself, e.g.:
[[1,2], [3,4]].map(&:first) #=>
NoMethodError: undefined method `first' for 1:Fixnum
This flag no longer affects the output of the compiler wrappers, since
everything is buffered by the build process rather than each individual
tool.
Additionally, this is a user-facing knob that affects ARGV.verbose?, and
the combination of these two issues broke the --quieter feature.
Let's check for e.g. --help anywhere in the ARGV array rather than just
the first value to avoid brew upgrade --help causing problems.
ClosesHomebrew/homebrew#26675.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This reverts commit c32ab0a35a2dfa9b593f759ef0ae8b7af077b0b7.
There are other hard-coded uses of HEAD, in build_options for instance.
These all need to be fixed before enabling this.
Homebrew currently recognizes "--head" during the install process, but
rather than actually fetch HEAD it just nags the user to use the
correct option. Since we recognize the spelling anyway, this just
promotes the lowercase version to an official alias.
ClosesHomebrew/homebrew#26555.
This raise happened in no other ENV methods, and isn't really necessary
since fails_with guards against this method actually being called unless
gcc-4.2 is actually installed.