The :force behavior for ENV.gcc has been the default for some time, and
was used to force vanilla gcc in case the gcc symlink pointed at
llvm-gcc; for ENV.clang, this doesn't mattera as clang is just clang.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The clang frontend ignores a number of options that are accepted by gcc
and llvm-gcc. However, it produces a warning for each unused argument at
each invocation, which can result in many lines of noise, e.g.
clang: warning: argument unused during compilation: '-rdynamic'
Since these arguments do not affect compilation, let's just silence the
warnings by passing '-Qunused-arguments' to clang by default.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Calling Keg#unlink on "#{f.rack}/#{f.version}" will perform the unlink
relative to the _new_ keg, rather than the keg we are upgrading from.
Fix this by resolving the linked_keg entry and unlinking relative to it.
FixesHomebrew/homebrew#10296.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This file is installed by a number of packages, but it really shouldn't
be. It is meant to be updated by packages that use it, but this is
broken (1) by software that doesn't do this correctly and (2) by the
symlink being overwritten by Homebrew's linking code.
It's presence can cause issues with tools that use libiconv/gettext.
Instead let's follow MacPorts' example and just remove it during the
clean stage.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
These now return an Array of all the target destinations.
Previously, if a single argument was passed a single non-
Array was returned.
This behavior has been changed so that an Array is always returned
even for a single argument.
Updated the test.
Hopefully this won't break any custom code out there.
Also xcrun can only exist at /usr/bin/xcrun.
Most of these edges are non-buildable environments, but I didn't know that when writing it, so it may as well stay, since it still does make brew --env more correct.
Using xcrun as a proxy to execute the compiler tools is per its design. This means you can't treat ENV['CC'] as a path anymore, but I think I found the cases this was being expected and corrected them. It was not proper anyway to assume the variable was a path, it can be anything. Like a proxy. Like xcrun.
Also more thoroughly clear ENV.
If we're going to unset GREP_OPTIONS we may as well unset this one too,
as it causes similar issues. Recent autoconf unset both of these.
FixesHomebrew/homebrew#8165.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This was probably a stupid decision in the first place. Who wants lengthy compile times for debatable gain? Apple use Os in all Xcode projects, so I'm guessing its the best choice.
Also I have long suspected the Image Magick performance issues Homebrew is supposedly susceptible to were because of O3.
Useful when CXXFLAGS has diverged fom CFLAGS, e.g. via ENV.append, and
also it is nice for CXX to have symmetry with CC.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
If a keg has been uninstalled via `rm -rf <keg>`, and a user tries to
reinstall it without `brew unlink`ing it first, it will fail to link as
the LinkedKegs entry still exists. This isn't desirable, and the user
should be able to reinstall the same formula on top of the old, dead
symlinks without problems, so let's just remove the LinkedKegs entry if
it matches the one we are installing anyway.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>