diff options
author | ullysses.a.eoff <ullysses.a.eoff@intel.com> | 2014-10-02 15:34:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-02 22:34:40 +0000 |
commit | 66e31a6c026cd22fa2341d924f5ceb18652ec217 (patch) | |
tree | d27185bf45e85684e257e5eda9b50e20d2f12dac /gpu/khronos_glcts_support | |
parent | a8afe3557d0758c506add74423e0840969cb27d9 (diff) | |
download | chromium_src-66e31a6c026cd22fa2341d924f5ceb18652ec217.zip chromium_src-66e31a6c026cd22fa2341d924f5ceb18652ec217.tar.gz chromium_src-66e31a6c026cd22fa2341d924f5ceb18652ec217.tar.bz2 |
gpu/khronos_glcts_support: WA suppress compile-time warnings on linux
Add various cflags/cflags_cc and disable clang chromium-style
enforcement on third_party/khronos_glcts sourcecode and support.
This is a workaround for various compile time warnings on desktop
linux (e.g. Ubuntu 12.04) that are treated as errors (i.e. by
-Werror). The source of these warnings are from the
third_party/khronos_glcts sourcecode. With these workarounds
the khronos_glcts_test is able to finish compilation.
The plan is to eventually fix the third-party code so we can
remove these workarounds.
BUG=chromium:412865
R=piman@chromium.org, kbr@chromium.org
TBR=piman@chromium.org
TEST=export GYP_DEFINES="internal_khronos_glcts_tests=1"
TEST=gclient runhooks
TEST=ninja -C out/Release khronos_glcts_test
TEST=./out/Release/khronos_glcts_test
TEST=ninja -C out/Debug khronos_glcts_test
TEST=./out/Debug/khronos_glcts_test
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Review URL: https://codereview.chromium.org/615063004
Cr-Commit-Position: refs/heads/master@{#297929}
Diffstat (limited to 'gpu/khronos_glcts_support')
-rw-r--r-- | gpu/khronos_glcts_support/khronos_glcts.gypi | 6 | ||||
-rw-r--r-- | gpu/khronos_glcts_support/khronos_glcts_cts.gyp | 12 | ||||
-rw-r--r-- | gpu/khronos_glcts_support/khronos_glcts_framework.gyp | 32 | ||||
-rw-r--r-- | gpu/khronos_glcts_support/khronos_glcts_gtf.gyp | 32 |
4 files changed, 82 insertions, 0 deletions
diff --git a/gpu/khronos_glcts_support/khronos_glcts.gypi b/gpu/khronos_glcts_support/khronos_glcts.gypi index cfb8bde..ebd8919 100644 --- a/gpu/khronos_glcts_support/khronos_glcts.gypi +++ b/gpu/khronos_glcts_support/khronos_glcts.gypi @@ -32,6 +32,12 @@ ], }, 'variables': { + + # WA: Suppress [chromium-style] enforcement errors when compiled with + # clang. The third_party/khronos_glcts sourcecode does not comply with + # the chromium-style standards. + 'clang_use_chrome_plugins': 0, + 'glcts_data_dirs': [ '<(DEPTH)/third_party/khronos_glcts/cts/data', ], diff --git a/gpu/khronos_glcts_support/khronos_glcts_cts.gyp b/gpu/khronos_glcts_support/khronos_glcts_cts.gyp index 6e00afc..560deec 100644 --- a/gpu/khronos_glcts_support/khronos_glcts_cts.gyp +++ b/gpu/khronos_glcts_support/khronos_glcts_cts.gyp @@ -10,6 +10,18 @@ { 'target_name': 'glcts_common', 'type': 'static_library', + 'conditions': [ + ['OS=="linux"', { + 'cflags_cc': [ + # WA: Suppress "implicit conversion turns string literal into + # bool" compile warning from glcShaderIndexingTests.cpp, + # glcShaderLibraryCase.cpp and glcShaderLoopTests.cpp during + # Debug build + # TODO(uartie) fix. + '-Wno-string-conversion', + ], + }], + ], 'dependencies': [ '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:delibs', '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:tcutil', diff --git a/gpu/khronos_glcts_support/khronos_glcts_framework.gyp b/gpu/khronos_glcts_support/khronos_glcts_framework.gyp index 27a3962..578794f 100644 --- a/gpu/khronos_glcts_support/khronos_glcts_framework.gyp +++ b/gpu/khronos_glcts_support/khronos_glcts_framework.gyp @@ -30,6 +30,16 @@ { 'target_name': 'debase', 'type': 'static_library', + 'conditions': [ + ['OS=="linux"', { + 'cflags': [ + # WA: Suppress "implicit declaration of function '__assert_fail' + # is invalid in C99" warning from deDefs.c for Release compiles. + # TODO(uartie) fix. + '-Wno-implicit-function-declaration', + ], + }], + ], 'direct_dependent_settings': { 'include_dirs': [ '<(DEPTH)/third_party/khronos_glcts/framework/delibs/debase', @@ -131,6 +141,17 @@ { 'target_name': 'tcutil', 'type': 'static_library', + 'conditions': [ + ['OS=="linux"', { + 'cflags_cc': [ + # WA: Suppress "cast to 'const unsigned char *' from smaller + # integer type 'deUint32' (aka 'unsigned int')" compile warning + # from tcuRandomValueIterator.hpp. + # TODO(uartie) fix. + '-Wno-int-to-pointer-cast', + ], + }], + ], 'dependencies': [ 'delibs', 'qphelper', '<(DEPTH)/third_party/libpng/libpng.gyp:libpng', @@ -188,6 +209,17 @@ { 'target_name': 'tcutil_egl', 'type': 'static_library', + 'conditions': [ + ['OS=="linux"', { + 'cflags_cc': [ + # WA: Suppress "cast to 'void *' from smaller + # integer type 'glw::GLuint' (aka 'unsigned int')" compile + # warning from tcuEglPlatform.cpp. + # TODO(uartie) fix. + '-Wno-int-to-void-pointer-cast', + ], + }], + ], 'dependencies': [ 'delibs', 'tcutil', 'glwrapper', # TODO: We may want to phase out the old gles2_conform support in preference diff --git a/gpu/khronos_glcts_support/khronos_glcts_gtf.gyp b/gpu/khronos_glcts_support/khronos_glcts_gtf.gyp index 16e6694..246ab07 100644 --- a/gpu/khronos_glcts_support/khronos_glcts_gtf.gyp +++ b/gpu/khronos_glcts_support/khronos_glcts_gtf.gyp @@ -10,6 +10,38 @@ { 'target_name': 'gtf_es', 'type': 'static_library', + 'conditions': [ + ['OS=="linux"', { + 'cflags': [ + # WA: Suppress "control reaches end of non-void function" compile + # warning from GTFTestDriver.c. + # TODO(uartie) fix. + '-Wno-return-type', + + # WA: Suppress "incompatible pointer types passing to parameter" + # compile warning from GTFTestExtension.c. + # TODO(uartie) fix. + '-Wno-incompatible-pointer-types', + + # WA: Suppress "passing 'GLint [15]' to parameter of type + # 'GLuint *' (aka 'unsigned int') converts between pointers to + # integer types with different sign" compile warning from + # GTFGL2TestGetAttachedObjects.c + # TODO(uartie) fix. + '-Wno-pointer-sign', + + # WA: Suppress "comparison of unsigned expression >= 0 is always + # true" compile warning from GTFgl.c + # TODO(uartie) fix. + '-Wno-tautological-compare', + + # WA: Suppress "equality comparison with extraneous parentheses" + # compile warning from GTFgl.c + # TODO(uartie) fix. + '-Wno-parentheses-equality', + ], + }], + ], 'dependencies': [ '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:debase', '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_cts.gyp:glcts_gtf_wrapper', |