aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compilers.rb
AgeCommit message (Collapse)Author
2014-04-14CompilerFailure: llvm can't build C++11 eitherMisty De Meo
2014-04-12CompilerFailure: don't mutate compiler hashesMisty De Meo
Fixes Homebrew/homebrew#28357.
2014-04-12Formula: provide compiler failure collectionsMisty De Meo
`needs` allows formulae to specify dependencies on cross-compiler dependencies, allowing multiple failures to be specified in a single statement. For instance, `needs :cxx11` adds seven compiler failures. Closes Homebrew/homebrew#22912.
2013-12-12Put positive case first, drop redundant is_a? checkJack Nagel
2013-12-03Adjust fails_with syntax for non-Apple compilersMisty De Meo
The old version worked like this: fails_with :gcc => '4.8.1' That wasn't really flexible enough, and made it harder to distinguish different releases in the same GCC series. Since no one was really using it yet, this adjusts the syntax to be more similar to the Apple compilers: fails_with :gcc => '4.8' do release '4.8.1' end Like with Apple compilers, omitting `release` blacklists the entire series. This also unifies the `build` and `version` attributes and accessors, and exposes them under both names.
2013-12-03Make CompilerSelectionError an InstallationErrorJack Nagel
Fixes Homebrew/homebrew#19962.
2013-09-10Compiler priority: fix llvm-gcc priorityMisty De Meo
llvm-gcc should still get priority over non-Apple GCCs. Fixes Homebrew/homebrew#22424.
2013-09-01Remove attr_rw for CompilerFailure version attributeMisty De Meo
This reverts commit 7db9ef9650a44ef8155bf66efd88703e580057b0.
2013-09-01CompilerFailure: specify attr_rw for versionMisty De Meo
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-06-12Remove unused variableJack Nagel
2013-06-04Extract attr_rw from Formula for reuseJack Nagel
Closes Homebrew/homebrew#20239.
2013-05-20Add gcc 4.0 to CompilerSelector compiler queueMisty De Meo
2013-05-20CompilerSelector: raise when no compatible compilerMisty De Meo
This replaces the old behaviour of falling back to the original compiler with no messaging. Fixes Homebrew/homebrew#19170. Fixes mistydemeo/tigerbrew#45.
2013-05-08Add gcc-4.0 to fails_withMisty De Meo
2013-04-02Isolate compiler selector testsJack Nagel
2013-04-02CompilerSelector: don't use non-existent compilersJack Nagel
2013-04-02Bump useable clang version to 318Jack Nagel
Build 211 can build most things, but I've seen intermittent miscompilation and slower code. Also it comes from Xcode 4.2, so most people don't have it anyway. Let's use 218 as the minimum viable version.
2013-03-16Decouple CompilerSelector from ENVJack Nagel
2013-03-16Use a priority queue to select compilersJack Nagel
The existing case-statement with nested if-statements is gross and hard to extend. Replacing it with a priority queue simplifies the logic and makes it very easy to add new compilers to the fails_with system, which we will likely want to do in the future.
2013-03-16Replace custom collection with SetJack Nagel
The original constraints that led to using a custom collection rather than Array or Set here no longer exist, so let's avoid the pointless abstraction here.
2013-03-12Switch compilers when no build is specifiedJack Nagel
Given the current state of OS X compilers, the original fails_with behavior is becoming less useful, mostly resulting in build failures each time the compiler is updated. So make the following changes: When a build is specified, we retain the old behavior: switch compilers if the available compiler is <= the build, don't switch if it is > the build. When no build is specified, unconditionally switch compilers, and don't output the advice message. This allows us to mark formulae as perpetually failing, avoiding the need to update formulae each time a new compiler build is made available. As a bonus, this makes the logic much easier to reason about. Closes Homebrew/homebrew#18175.
2013-02-21Only fails_with compiler version for developers.Mike McQuaid
Actually works properly now. This reverts commit a0e56345ea55f7ee3c41d6bf13f9cfb3af635323.
2013-02-20Revert "Only fails_with compiler version for developers."Mike McQuaid
This reverts commit c98d50495275ff4951dd126bb88a55e568b64092.
2013-02-18Only fails_with compiler version for developers.Mike McQuaid
Closes Homebrew/homebrew#17618. Closes Homebrew/homebrew#17813.
2013-02-18Don't shadow outer local variablesJack Nagel
2013-01-07Remove Array subclassingJack Nagel
Inheriting from Array (and other core types) is problematic: - It exposes a very wide interface with many methods that are not really relevant to the subclass. - It can cause some weird side effects, as many Array operations are in C and have hardcoded return values; for example, combining two array subclasses returns a new Array instead of the subclass. Avoid these problems using delegation and the Enumerable module where applicable.
2012-08-11Don't warn uses on :fails_with compiler blocks.Mike McQuaid
Fixes Homebrew/homebrew#14121.
2012-04-01New fails_with infrastructureJack Nagel
- Formulae can now declare failures on any compiler. - FailsWithLLVM and associated formula elements have been moved to compat. Signed-off-by: Jack Nagel <jacknagel@gmail.com>