diff options
| author | Jack Nagel | 2012-02-18 12:25:23 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-02-21 00:22:17 -0600 |
| commit | f8e3e806f9a8a8660d15fbd2aef5459944d965b0 (patch) | |
| tree | 79eec0f66208c4ab6e8d1a99df8c19453edd475d /Library/Homebrew/extend | |
| parent | 78d4fda6d65f0a9a0882e2aeaa121a13cd872a10 (diff) | |
| download | brew-f8e3e806f9a8a8660d15fbd2aef5459944d965b0.tar.bz2 | |
Silence unused argument warnings from clang
The clang frontend ignores a number of options that are accepted by gcc
and llvm-gcc. However, it produces a warning for each unused argument at
each invocation, which can result in many lines of noise, e.g.
clang: warning: argument unused during compilation: '-rdynamic'
Since these arguments do not affect compilation, let's just silence the
warnings by passing '-Qunused-arguments' to clang by default.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index eb6af9ccc..146c25755 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -163,6 +163,7 @@ module HomebrewEnvExtension replace_in_cflags(/-Xarch_i386 (-march=\S*)/, '\1') # Clang mistakenly enables AES-NI on plain Nehalem set_cpu_cflags 'native', :nehalem => 'native -Xclang -target-feature -Xclang -aes' + append_to_cflags '-Qunused-arguments' @compiler = :clang end @@ -347,6 +348,9 @@ Please take one of the following actions: # Don't set -msse3 and older flags because -march does that for us append_to_cflags '-march=' + map.fetch(Hardware.intel_family, default) end + + # not really a 'CPU' cflag, but is only used with clang + remove_from_cflags %r{ -Qunused-arguments} end # actually c-compiler, so cc would be a better name |
