aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/ENV/std.rb
AgeCommit message (Collapse)Author
2014-06-22Use Pathname#splitJack Nagel
2014-06-22Move the compiler-selecting methods to ENV/sharedShaun Jackman
Closes Homebrew/homebrew#30210. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-26Share code for sanitizing ENV between both build environmentsJack Nagel
2014-05-06ENV/std: use full paths to gcc versions.Mike McQuaid
This is consistent with how e.g. `gcc-4.2` is handled. This means e.g. `ghc` can find `gcc-4.8` at runtime. Fixes Homebrew/homebrew#28934.
2014-05-01Xcode-only path adjustments should be the same in both environmentsJack Nagel
2014-05-01Move xctoolchain_path to Xcode module, where it belongsJack Nagel
2014-04-29Drop obsolete compiler fallback in stdenvJack Nagel
This code originated in a slightly different form in 8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad: https://github.com/Homebrew/homebrew/blob/8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad/Library/Homebrew/extend/ENV.rb#L30-L32 Back then, MacOS.default_compiler could return nil, which meant ENV.compiler could do the same. This code was carried forward as the surrounding code changed. At this point it should be unreachable.
2014-04-29Use MacOS.locate and delete wrong commentJack Nagel
2014-04-29Remove comment that no longer reflects adjacent codeJack Nagel
2014-04-29We don't use -Qunused-arguments anymoreJack Nagel
2014-04-29ENV.{cc,cxx} setters already set OBJC and OBJCXXJack Nagel
2014-04-29Make ENV.O4 a no-opJack Nagel
On older Apple compilers "-O4" is known to cause build errors. On recent clang, it's the same as "-O3" and you have to pass "-O3 -flto" to get the old behavior.
2014-04-23Support core GCC formula as a GCC compiler.Mike McQuaid
It is activated by the same mechanism as the Homebrew/versions compilers which now check if the GCC formula uses the same, correct version. References Homebrew/homebrew#28418.
2014-03-28Add ENV.refurbish_args helperMisty De Meo
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.
2014-03-08Revert "ENV: request no byte code Python when bottling."Mike McQuaid
This reverts commit b603c96276cf7fe1417d2355eebc47fb15da0b8c.
2014-03-02ENV: request no byte code Python when bottling.Mike McQuaid
2014-01-04ENV.gcc: remove raiseMisty De Meo
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.
2014-01-04Recommit ENV changesMisty De Meo
2014-01-04Revert "stdenv: fix self.cc check"Mike McQuaid
This reverts commit 0e1d52c0d3945ae0ac69383c7734e425b7fbf8f1.
2014-01-04Revert "stdenv: set correct compiler symbol for gcc 4.0"Mike McQuaid
This reverts commit f4dc5614953b3b90acc28c83262d56587b0616b1.
2014-01-03stdenv: set correct compiler symbol for gcc 4.0Misty De Meo
2014-01-03stdenv: fix self.cc checkMisty De Meo
Since ENV.cc/cxx are accessors to ENV, any values being passed through are coerced into strings, which means that a nil `ENV.cc` is actually an empty string - which isn't considered to be false in Ruby. Fixes mistydemeo/tigerbrew#161. Fixes mistydemeo/tigerbrew#135.
2013-11-27Adjust optimization flags if the CPU does not support SSE4Jack Nagel
Tentatively fixes Homebrew/homebrew#21778, Homebrew/homebrew#24363.
2013-11-20Move optimization flag selection out of cc wrapperJack Nagel
The mapping of architectures to optimization flags is now retrieved from Hardware::CPU and the selected flags are passed as an environmen variable, rather than duplicated in the cc wrapper and re-calculated on every invocation of the compiler. Closes Homebrew/homebrew#24540.
2013-11-12Simplify ENV.0x methods in stdenvJack Nagel
2013-11-12Add ENV.O0 to stdenvJack Nagel
2013-11-02stdenv: drop space between "-isystem" and path.Xiyue Deng
* This is consistent with superenv.
2013-10-27Make stdenv handling less intrusive.Xiyue Deng
* Don't encode "-Qunused-arguments", as this is only supported in Clang and will break building when C/C++ compiler is switched during the process, e.g. building gcc. The warning is harmless without "-Werror".
2013-10-26Clang standard library selection.Xiyue Deng
* Add new ENV function for selecting stdlib for Clang. - The selection is no-op for non-system-clang compilers. - Both superenv and stdenv are handled. * Add new HOMEBREW_CCCFG flag and ccwrapper handling.
2013-10-26C++11 support.Xiyue Deng
* Add options and ENV method to specify building in C++11 mode. - Set C++ compiler flags to enable C++11 mode. - To add options to support C++11 mode, a formula can now use option :cxx11 to provide "--c++11" option, and detect and enable C++11 support in install method using ENV.cxx11 if build.cxx11? Closes Homebrew/homebrew#22453.
2013-10-18Rename MacOS to OS::MacJack Nagel
2013-10-18Add OS.mac? and OS.linux?Jack Nagel
2013-10-04ENV.x11: only use SDK when CLT is missing and X11 is from AppleJack Nagel
2013-10-04ENV.x11: always add include/freetype2 to CPPFLAGSJack Nagel
2013-09-28Move ld64 into SharedEnvExtensionMisty De Meo
Superenv is being tested on Xcode 3.1.4, so this needs to be supported in both ENVs, not just stdenv.
2013-09-17Move CompilerSelector logic into build env setupMisty De Meo
This moves the CompilerSelector fails_with logic into the build environment setup, making the compiler selection available before performing actions that depends on knowing what the compiler is, e.g. setting up PATH. ENV.setup_build_environment now optionally takes a Formula argument to provide the information necessary to do the fails_with, and the new ENV.validate_cc! extracts the fails_with logic from Build.install.
2013-09-03ENV: use cc accessorJack Nagel
2013-09-01Implement fails_with for non-Apple compilersMisty De Meo
This adds support for non-Apple GCC compilers in the fails_with code. A fails_with block for a non-Apple compiler looks like: fails_with :gcc => '4.8.1' do cause 'Foo' end Non-Apple compilers don't have build numbers, so compiler failures are based on version strings instead. Internally non-Apple compilers can be distinguished because they are passed around as strings instead of symbols. In addition, this alters the priority list for compilers, with the following changes: * Apple GCC 4.2 and LLVM-GCC swap positions, with GCC now taking priority. (Maybe LLVM-GCC should just go away.) * Non-Apple GCC compilers are ranked below GCC 4.2 but above LLVM-GCC and Apple GCC 4.0.
2013-09-01Experimental support for non-Apple GCCsMisty De Meo
2013-08-30ENV: use cflags setterJack Nagel
2013-08-30ENV: use cc accessorJack Nagel
2013-08-30ENV: add cc and cxx settersJack Nagel
2013-08-30Unify compiler selection logicMisty De Meo
This unifies the logic for selecting a compiler between superenv and stdenv. A variation of superenv's `determine_cc`, which now returns a symbol, has been moved into the shared ENV extension. Stdenv uses the result of this directly (as it's always used symbols), while superenv translates that back into a compiler string. This also has the effect of disabling HOMEBREW_USE_(gcc|llvm|clang) in stdenv, which have already been marked as deprecated for some time, and enables the HOMEBREW_CC= environment variable syntax from superenv in stdenv.
2013-08-30Add --cc= syntax for selecting compilersMisty De Meo
2013-08-28Allow building bottles with custom architecturesMisty De Meo
This allows overriding the "oldest CPU" behaviour - for instance, to build Intel bottles for a newer CPU than Core 2, to build a PPC bottle with or without Altivec on the same computer, etc.
2013-08-26Simplify conditionJack Nagel
2013-08-23Always pass -headerpad_max_install_names to the linkerJack Nagel
We use install_name_tool pretty liberally, so we need to take steps to ensure libraries and executables are always linked with this flag. Closes Homebrew/homebrew#20233. Fixes Homebrew/homebrew#17984. Fixes Homebrew/homebrew#22078.
2013-08-19Use ENV.append_pathJack Nagel
2013-08-19Use File::PATH_SEPARATOR globally instead of ':'Amos Wenger
On Unix, the path separator is ':', whereas on Windows, it is ';'. This is the first of a series of patch to bring macbrew's and winbrew's codebases closer together. The main places the magic constant ':' was being used were: - the $PATH environment variable - CMAKE-related environment variables - pkg-config related environment variables Closes Homebrew/homebrew#21921. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19Remove ENV.expand_xcrunJack Nagel
This method is currently unused and after inspecting the git history, it appears it may never have been used at all.