aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index abad5e76a..88cb5e2ac 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -351,4 +351,13 @@ Please take one of the following actions:
Hardware.processor_count
end
end
+
+ def remove_cc_etc
+ keys = %w{CC CXX LD CPP LDFLAGS CFLAGS CPPFLAGS}
+ removed = Hash[*keys.map{ |key| [key, ENV[key]] }.flatten]
+ keys.each do |key|
+ ENV[key] = nil
+ end
+ removed
+ end
end