aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
diff options
context:
space:
mode:
authorMisty De Meo2013-09-10 23:08:17 -0700
committerMisty De Meo2013-09-17 12:43:38 -0700
commit045aadb8608c5d56a4e71e2859c56f3ed3a7cbbb (patch)
treece077b985ba98650f64eb654c0ba0861e9a23f22 /Library/Homebrew/build.rb
parenta9562366d26b92d5c54158665c109906e4e2caa3 (diff)
downloadhomebrew-045aadb8608c5d56a4e71e2859c56f3ed3a7cbbb.tar.bz2
Move CompilerSelector logic into build env setup
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.
Diffstat (limited to 'Library/Homebrew/build.rb')
-rwxr-xr-xLibrary/Homebrew/build.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 69ef1a6de..de9d503f3 100755
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -120,12 +120,12 @@ class Build
ENV.keg_only_deps = keg_only_deps.map(&:to_s)
ENV.deps = deps.map { |d| d.to_formula.to_s }
ENV.x11 = reqs.any? { |rq| rq.kind_of?(X11Dependency) }
- ENV.setup_build_environment
+ ENV.setup_build_environment(f)
post_superenv_hacks
reqs.each(&:modify_build_environment)
deps.each(&:modify_build_environment)
else
- ENV.setup_build_environment
+ ENV.setup_build_environment(f)
reqs.each(&:modify_build_environment)
deps.each(&:modify_build_environment)
@@ -141,14 +141,6 @@ class Build
end
end
- if f.fails_with? ENV.compiler
- begin
- ENV.send CompilerSelector.new(f).compiler
- rescue CompilerSelectionError => e
- raise e.message
- end
- end
-
# We only support libstdc++ right now
stdlib_in_use = CxxStdlib.new(:libstdcxx, ENV.compiler)