Bug 209014 - [ANGLE] Source/ThirdParty/ANGLE/src/common/utilities.cpp:10: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
Summary: [ANGLE] Source/ThirdParty/ANGLE/src/common/utilities.cpp:10: warning: ignorin...
Alias: None
Product: WebKit
Classification: Unclassified
Component: ANGLE (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
Keywords: InRadar
Depends on:
Reported: 2020-03-12 13:18 PDT by Michael Catanzaro
Modified: 2020-03-15 19:09 PDT (History)
8 users (show)

See Also:

Patch (2.15 KB, patch)
2020-03-12 13:40 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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]

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