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>
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 HOMEBREW_KEEP_INFO environment variable is set:
- Do not symlink the info directory file (aka 'share/info/dir')
otherwise it gets overwritten by next installed brew.
- Install an entry in the directory for each linked info file when the
brew is linked.
- Uninstall the entry when the brew is unlinked.
ClosesHomebrew/homebrew#9700.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Allow the use of a Homebrewed gcc-4.2 in order to support homebrew-alt's
apple-gcc42 formula.
This also removes the :force filtering for the gcc-4.2 check error.
ClosesHomebrew/homebrew#9384.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
In later XCodes, gcc is a symlink to gcc-4.2 which is itself a symlink
to llvm-gcc, so it is necessary to resolve multiple symlinks.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- Fix ENV.libxml2 to update CPPFLAGS rather than CFLAGS
- Methods ENV.{gcc*,llvm,clang} now reset CPU-specific optimization
flags on every call.
ClosesHomebrew/homebrew#8105.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.
If XZUtils isn't installed, we abort and prompt the user to `brew
install xz`.
The `xz` command itself doesn't do any untarring, so we write the
decompressed archive to stdout and pipe it to tar.
Previously, stripping arguments like `--HEAD` for dependencies failed because
that flag affects the installation prefix encoded into formula objects. The
previous implementation of `ARGV` filtering tried to contain all changes to a
single method call before the `FormulaInstaller` forks. This update spreads
things out a bit:
- The Homebrew `ARGV` extension adds a new method, `filter_for_dependencies`
which strips flags like `--HEAD`, yields to a block, then restores the
original contents of ARGV.
- The `explicitly_requested?` test, which returns true or false depending on
if a formula object is a member of `ARGV.formulae`, is now a method of
`Formula` objects.
- `FormulaInstaller` objects now execute the installation of dependencies
inside an `ARGV.filter_for_dependencies` block if the dependency was
`explicitly_requested?`.
FixesHomebrew/homebrew#8668.
ClosesHomebrew/homebrew#7724.
Often it is useful to provide a development build in addition to the
stable release or HEAD download.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Commit 2695821e98 ("Only use the bottle if its version is up-to-date")
essentially broke the ImageMagick bottle, because the version parsing
logic returns "1" as the bottle version.
Fixing this requires only a slight modification to the bottle URL regex;
includes a test.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>