diff options
| author | Max Howell | 2012-08-29 15:19:42 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-29 15:19:42 -0400 |
| commit | a7946e0088185ff852babc657d5ccf1b57851575 (patch) | |
| tree | b3382fbbffedaeda96c20301a1546456ef858b70 /Library/ENV | |
| parent | 466a240bbe366d994020aab624e742aac834aebf (diff) | |
| download | brew-a7946e0088185ff852babc657d5ccf1b57851575.tar.bz2 | |
Warn about removed warnings less shockingly
The problem here now is though that the warnings only appear when compiling verbosely. But they should thus be visible if the build fails. Or if people are hunting for problems.
Diffstat (limited to 'Library/ENV')
| -rwxr-xr-x | Library/ENV/4.3/cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 2342dc51e..2d7e6ca80 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -106,6 +106,13 @@ class Cmd args << arg end end + + rms = @args - args + %w{CPPFLAGS LDFLAGS CXXFLAGS CFLAGS}.each do |flag| + unison = ENV[flag].split(' ') & rms + puts "Warning! #{unison*' '} removed from #{flag.upcase} by superenv" unless unison.empty? + end + args end def cflags @@ -135,10 +142,6 @@ end ####################################################################### sanity abort "The build-tool has reset ENV. --lame-env required." unless ENV['HOMEBREW_BREW_FILE'] -%w{CPPFLAGS LDFLAGS CXXFLAGS CFLAGS}.each do |flag| - puts "#{flag} set but superenv running! Flags may be removed!" if ENV[flag] -end - ######################################################################### main cmd = Cmd.new($0, ARGV) exec "xcrun", cmd.tool, *cmd.args |
