This allows you to use llvm as your default compiler and keep the cc symlink
pointed at llvm, while allowing you to build forumla that requires the gcc.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.
But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.
If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.
Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
Different llvm binaries were used to check build numbers and to compile with.
Normalize this, and normalize the variable name used to hold the xcode location.
(Calling it "prefix" is confusing, since there are already concepts in Homebrew
called "prefx".)
Justification:
* LLVM is too immature, it often fails to compile, sometimes irreproducibly
* The performance of the resulting bytecode is often slower than the GCC
equivalent (eg MySQL)
If you want to continue using LLVM you can. Set HOMEBREW_USE_LLVM or brew with
--use-llvm.
We also now use the default compiler for each platform. So GCC 4.2 on Snow and
GCC 4.0 on Leopard. This also means that new formula are more likely to just
work as many over complicated build systems get upset when you mix things up.
I also did a bunch more new research regarding compiler flags. We now set the
right -march for nehalem procs and don't add redundant flags like msse3 (which
is automatically applied for all the -march settings we use).
Reducing the number of cflags will improve the overall reliability of our
platform.
CMake ignores the CPPFLAGS and LDFLAGS environment variables. This makes sure CMake finds libraries when homebrew is not installed at /usr/local.
Signed-off-by: Max Howell <max@methylblue.com>
FixesHomebrew/homebrew#242
-fomit-frame-pointer is included for any optimisation level above O2 (including Os)
Setting MACOS_DEPLOYMENT_TARGET is unecessary if you are just setting it the same as the OS X you are running.
This means our include directory is prioritised above all -I but after all other system directories. This is how it should be.
Also helps fixHomebrew/homebrew#113.
The classes better reflect their contents. I'm sure this change may be
contentious, but I am a sucker for trying to create source bases that are easy
to get to grips with and easy to navigate.
brewkit.rb is now a deprecated file.