Bug 246289

Summary: Warnings when building ANGLE
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: ANGLEAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, dino, kbr, kkinnunen, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Michael Catanzaro
Reported 2022-10-10 12:35:17 PDT
ANGLE should compile quietly. Currently there are a couple warnings, then a warning about my previous failed attempt to quiet a warning, and finally there is noisy output from the adjust-angle-include-paths.py script that should be quiet. I'll try to fix this without patching the source code if possible. [1449/7121] Building CXX object Source/ThirdParty/ANGLE/C...ANGLE.dir/src/libANGLE/renderer/gl/renderergl_utils.cpp.o In file included from /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/include/platform/FeaturesGL_autogen.h:13, from /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/RendererGL.h:19, from /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/ContextGL.h:14, from /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp:24: /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp: In function ‘void rx::nativegl_gl::InitializeFeatures(const rx::FunctionsGL*, angle::FeaturesGL*)’: /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp:2024:48: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 2024 | !isMesa || isIntel && (Is9thGenIntel(device) || IsGeminiLake(device) || | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2025 | IsCoffeeLake(device) || Is11thGenIntel(device) || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2026 | Is12thGenIntel(device))); | ~~~~~~~~~~~~~~~~~~~~~~~ /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/include/platform/Feature.h:19:36: note: in definition of macro ‘ANGLE_FEATURE_CONDITION’ 19 | (set)->feature.enabled = cond; \ | ^~~~ [1501/7121] Building CXX object Source/ThirdParty/ANGLE/CMakeFiles/ANGLE.dir/src/libANGLE/State.cpp.o /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/libANGLE/State.cpp:10: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas] 10 | #pragma clang diagnostic ignored "-Wglobal-constructors" | [1528/7121] Building C object Source/ThirdParty/ANGLE/CMakeFiles/ANGLE.dir/src/common/third_party/xxhash/xxhash.c.o cc1: warning: command-line option ‘-Wno-class-memaccess’ is valid for C++/ObjC++ but not for C [1571/7121] cd /home/mcatanzaro/Projects/WebKit/WebKitBui...Kit/Source/ThirdParty/ANGLE/adjust-angle-include-paths.py Postprocessed ANGLE header entry_points_egl_autogen.h Postprocessed ANGLE header entry_points_egl_ext_autogen.h Postprocessed ANGLE header entry_points_gles_2_0_autogen.h Postprocessed ANGLE header entry_points_gles_3_0_autogen.h Postprocessed ANGLE header entry_points_gles_ext_autogen.h Postprocessed ANGLE header egl.h Postprocessed ANGLE header eglext.h Postprocessed ANGLE header eglplatform.h Postprocessed ANGLE header gl.h Postprocessed ANGLE header gl2.h Postprocessed ANGLE header gl2ext.h Postprocessed ANGLE header gl2platform.h Postprocessed ANGLE header gl3.h Postprocessed ANGLE header gl31.h Postprocessed ANGLE header gl3platform.h Postprocessed ANGLE header gl32.h Postprocessed ANGLE header glplatform.h
Attachments
Michael Catanzaro
Comment 1 2022-10-10 13:47:42 PDT
Well I ran into trouble here: > [1528/7121] Building C object Source/ThirdParty/ANGLE/CMakeFiles/ANGLE.dir/src/common/third_party/xxhash/xxhash.c.o cc1: warning: command-line option ‘-Wno-class-memaccess’ is valid for C++/ObjC++ but not for C I think it's time to just use -w when building ANGLE. Problem is WEBKIT_ADD_TARGET_C_FLAGS and WEBKIT_ADD_TARGET_CXX_FLAGS are actually adjusting the flags for both C and C++: # Appends flags to COMPILE_FLAGS of _target if supported by the C++ compiler. # Note that it is simply not possible to pass different C and C++ flags, unless # we drop support for the Visual Studio backend and use the COMPILE_LANGUAGE # generator expression. This is a very serious limitation. macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target) foreach (_flag ${ARGN}) check_cxx_compiler_flag("${_flag}" CXX_COMPILER_SUPPORTS_${_flag}) if (CXX_COMPILER_SUPPORTS_${_flag}) target_compile_options(${_target} PRIVATE ${_flag}) endif () endforeach () endmacro() So that's unfortunate. Are we OK with just turning off warnings for ANGLE? That is the easy solution here. If not, I'll need to fix the warnings in the source code instead of turning them off at the CMake level, and will request help from WebKit's ANGLE developers to upstream the changes. I think warnings from ANGLE are very low value because we are not the upstream project and warnings are something that only upstream should worry about IMO, but this decision really has to be made by our ANGLE developers and not by me.
Michael Catanzaro
Comment 2 2022-10-13 12:20:39 PDT
Let's just use -w.
Michael Catanzaro
Comment 3 2022-10-14 08:29:28 PDT
Radar WebKit Bug Importer
Comment 4 2022-10-17 12:36:17 PDT
EWS
Comment 5 2022-10-19 09:24:32 PDT
Committed 255738@main (92dbcacf4c3e): <https://commits.webkit.org/255738@main> Reviewed commits have been landed. Closing PR #5378 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.