diff options
| author | Xiyue Deng | 2013-10-28 02:16:42 -0700 |
|---|---|---|
| committer | Xiyue Deng | 2013-11-02 17:30:05 -0700 |
| commit | 917b94df98ad03e88bef54b2fd944b7bc0e25f31 (patch) | |
| tree | 0fd49258251c8f41f554cf3007a7a8a9e8cb4ac9 /Library/Homebrew/cxxstdlib.rb | |
| parent | 6fc6dd791badba63e708623c6db5ecd3d8cb4ac6 (diff) | |
| download | brew-917b94df98ad03e88bef54b2fd944b7bc0e25f31.tar.bz2 | |
Add cxxstdlib_check method to request changing C++ stdlib checking.
* In certain cases, a C++ software may result in linking to a different
and incompatible C++ standard library than its dependencies and still
works fine because it is by design. Examples include GCC, which will
bootstrap itself and self-host after finish.
* Add a cxxstdlib_check method to formula to request changing the C++
standard library checking. Currently using "cxxstdlib_check :skip"
will let a formula skip such checking. This should only be used on
rare occasions and be very careful.
Closes Homebrew/homebrew#23687.
Diffstat (limited to 'Library/Homebrew/cxxstdlib.rb')
| -rw-r--r-- | Library/Homebrew/cxxstdlib.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Library/Homebrew/cxxstdlib.rb b/Library/Homebrew/cxxstdlib.rb index 2b4ec5827..fba868277 100644 --- a/Library/Homebrew/cxxstdlib.rb +++ b/Library/Homebrew/cxxstdlib.rb @@ -33,14 +33,17 @@ class CxxStdlib end def check_dependencies(formula, deps) - deps.each do |dep| - # Software is unlikely to link against anything from its buildtime deps, - # so it doesn't matter at all if they link against different C++ stdlibs - next if dep.tags.include? :build - - dep_stdlib = Tab.for_formula(dep.to_formula).cxxstdlib - if !compatible_with? dep_stdlib - raise IncompatibleCxxStdlibs.new(formula, dep, dep_stdlib, self) + unless formula.cxxstdlib.include? :skip + deps.each do |dep| + # Software is unlikely to link against anything from its + # buildtime deps, so it doesn't matter at all if they link + # against different C++ stdlibs + next if dep.tags.include? :build + + dep_stdlib = Tab.for_formula(dep.to_formula).cxxstdlib + if !compatible_with? dep_stdlib + raise IncompatibleCxxStdlibs.new(formula, dep, dep_stdlib, self) + end end end end |
