From 812c63ab2c3e779fbe1f7325a663b0cfe409e224 Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Tue, 3 Apr 2012 21:15:09 +0000 Subject: clang: Let target 'mesa' build without warnings. Suppress Wunused-value and Wconstant-conversion for the target. BUG=none TEST=`ninja all` output gets 43 lines shorter. NOTRY=true Review URL: http://codereview.chromium.org/9969116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130458 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/mesa/mesa.gyp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'third_party/mesa') diff --git a/third_party/mesa/mesa.gyp b/third_party/mesa/mesa.gyp index 031632a..4fc9d6b 100644 --- a/third_party/mesa/mesa.gyp +++ b/third_party/mesa/mesa.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -517,6 +517,23 @@ 'MesaLib/src/mesa/vbo/vbo_split_copy.c', 'MesaLib/src/mesa/vbo/vbo_split_inplace.c', ], + 'conditions': [ + ['clang == 1', { + 'xcode_settings': { + 'WARNING_CFLAGS': [ + # Several functions ignore the result of talloc_steal(). + '-Wno-unused-value', + # texenvprogram.c converts '~0' to a bitfield, which causes clang + # to warn that -1 is implicitly converted to 255. + '-Wno-constant-conversion', + ], + }, + 'cflags': [ + '-Wno-unused-value', + '-Wno-constant-conversion', + ], + }], + ], }, # Building this target will hide the native OpenGL shared library and # replace it with a slow software renderer. -- cgit v1.1