diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-25 04:03:17 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-25 04:03:17 +0000 |
commit | 554abd90c658eb93fb078f3daca2a34b58291747 (patch) | |
tree | 858230a49fceabe22c886a1a70c3a771f3708560 | |
parent | f4f15d99967b9a0d8b7673454fb86882b4e70bbb (diff) | |
download | chromium_src-554abd90c658eb93fb078f3daca2a34b58291747.zip chromium_src-554abd90c658eb93fb078f3daca2a34b58291747.tar.gz chromium_src-554abd90c658eb93fb078f3daca2a34b58291747.tar.bz2 |
Add -Wsign-compare for C++ compilation on linux & friends.
g++ -Wall includes -Wsign-compare on C++ source, but clang++ doesn't.
(this is a 2nd attempt to land this change, after 79846 had to be rolled back
because clang's -Wsign-compare semantics were different from gcc's; this has
been fixed in clang 135664)
BUG=none
TEST=chrome builds w/ rolled clang, trybots
Review URL: http://codereview.chromium.org/7493029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93837 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi index 69a42c6..54654b0 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1223,6 +1223,10 @@ # Make inline functions have hidden visiblity by default. # Surprisingly, not covered by -fvisibility=hidden. '-fvisibility-inlines-hidden', + # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, + # so we specify it explicitly. + # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. + '-Wsign-compare', ], 'ldflags': [ '-pthread', '-Wl,-z,noexecstack', |