Bug 209014

Summary: [ANGLE] Source/ThirdParty/ANGLE/src/common/utilities.cpp:10: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: ANGLEAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, dino, ews-watchlist, graouts, kondapallykalyan, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2020-03-12 13:18:13 PDT
ANGLE is using #pragma clang diagnostic outside of clang guards:

[214/1919] Building CXX object Source/...s/ANGLE.dir/src/common/utilities.cpp.o
/home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/common/utilities.cpp:10: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
   10 | #pragma clang diagnostic ignored "-Wglobal-constructors"
      |

All uses need to be guarded properly. GCC will warn whenever it sees another compiler's pragma.
Comment 1 Michael Catanzaro 2020-03-12 13:33:10 PDT
It's a downstream WebKit problem, added in our changes.diff:

diff --git a/src/common/utilities.cpp b/src/common/utilities.cpp
index 87932a53f..83ea168e2 100644
--- a/src/common/utilities.cpp
+++ b/src/common/utilities.cpp
@@ -6,6 +6,9 @@
 
 // utilities.cpp: Conversion functions and other utility routines.
 
+// Older clang versions have a false positive on this warning here.
+#pragma clang diagnostic ignored "-Wglobal-constructors"
+
 #include "common/utilities.h"
 #include <GLSLANG/ShaderVars.h>
 #include "GLES3/gl3.h"
Comment 2 Michael Catanzaro 2020-03-12 13:40:04 PDT
Created attachment 393408 [details]
Patch
Comment 3 EWS Watchlist 2020-03-12 13:41:10 PDT
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE
Comment 4 WebKit Commit Bot 2020-03-15 19:08:24 PDT
Comment on attachment 393408 [details]
Patch

Clearing flags on attachment: 393408

Committed r258484: <https://trac.webkit.org/changeset/258484>
Comment 5 WebKit Commit Bot 2020-03-15 19:08:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2020-03-15 19:09:17 PDT
<rdar://problem/60478777>