From bf3433bde788b84c2005e373bbde4b8bcf75d63c Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sat, 10 Sep 2011 11:24:29 +0100 Subject: With xcodebuild don't set CC, CXX, etc. The compiler setting in the xcodeproj is overridden by the CC setting in the environment. This is a bit insane IMO since the xcodeproj itself has detailed decisions about what tools to use. Fixes Homebrew/homebrew#6406. --- Library/Homebrew/extend/ENV.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Library/Homebrew/extend') 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 -- cgit v1.2.3