Commit 66e31a6c authored by ullysses.a.eoff's avatar ullysses.a.eoff Committed by Commit bot

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: default avatarU. Artie Eoff <ullysses.a.eoff@intel.com>

Review URL: https://codereview.chromium.org/615063004

Cr-Commit-Position: refs/heads/master@{#297929}
parent a8afe355
...@@ -32,6 +32,12 @@ ...@@ -32,6 +32,12 @@
], ],
}, },
'variables': { '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': [ 'glcts_data_dirs': [
'<(DEPTH)/third_party/khronos_glcts/cts/data', '<(DEPTH)/third_party/khronos_glcts/cts/data',
], ],
......
...@@ -10,6 +10,18 @@ ...@@ -10,6 +10,18 @@
{ {
'target_name': 'glcts_common', 'target_name': 'glcts_common',
'type': 'static_library', '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': [ 'dependencies': [
'<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:delibs', '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:delibs',
'<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:tcutil', '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:tcutil',
......
...@@ -30,6 +30,16 @@ ...@@ -30,6 +30,16 @@
{ {
'target_name': 'debase', 'target_name': 'debase',
'type': 'static_library', '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': { 'direct_dependent_settings': {
'include_dirs': [ 'include_dirs': [
'<(DEPTH)/third_party/khronos_glcts/framework/delibs/debase', '<(DEPTH)/third_party/khronos_glcts/framework/delibs/debase',
...@@ -131,6 +141,17 @@ ...@@ -131,6 +141,17 @@
{ {
'target_name': 'tcutil', 'target_name': 'tcutil',
'type': 'static_library', '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': [ 'dependencies': [
'delibs', 'qphelper', 'delibs', 'qphelper',
'<(DEPTH)/third_party/libpng/libpng.gyp:libpng', '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
...@@ -188,6 +209,17 @@ ...@@ -188,6 +209,17 @@
{ {
'target_name': 'tcutil_egl', 'target_name': 'tcutil_egl',
'type': 'static_library', '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': [ 'dependencies': [
'delibs', 'tcutil', 'glwrapper', 'delibs', 'tcutil', 'glwrapper',
# TODO: We may want to phase out the old gles2_conform support in preference # TODO: We may want to phase out the old gles2_conform support in preference
......
...@@ -10,6 +10,38 @@ ...@@ -10,6 +10,38 @@
{ {
'target_name': 'gtf_es', 'target_name': 'gtf_es',
'type': 'static_library', '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': [ 'dependencies': [
'<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:debase', '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_framework.gyp:debase',
'<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_cts.gyp:glcts_gtf_wrapper', '<(DEPTH)/gpu/khronos_glcts_support/khronos_glcts_cts.gyp:glcts_gtf_wrapper',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment