Disable header-hygiene warnings on all platforms
Previously -Wno-header-hygiene was added to cflags only on x64, so the
compiler was generating a lot of warnings when compiling for arm64.
Now this flag is added on all platforms.
Also removed -Wno-null-dereference - it doesn't generate any warnings.
Change-Id: Id145404dba169da64a6febdec2732aec681a11bd
Reviewed-on: https://swiftshader-review.googlesource.com/c/22028
Tested-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/third_party/llvm-7.0/BUILD.gn b/third_party/llvm-7.0/BUILD.gn
index 5876c3c..ec2fd43 100644
--- a/third_party/llvm-7.0/BUILD.gn
+++ b/third_party/llvm-7.0/BUILD.gn
@@ -54,15 +54,13 @@
cflags += [ "-Wno-error" ]
}
- if (is_clang && (target_cpu == "x86" || target_cpu == "x64")) {
- cflags += [
- "-msse2",
- "-Wno-header-hygiene",
- "-Wno-null-dereference",
- ]
- } else {
- # cflags += [ "-Wno-unused-but-set-variable" ]
+ if (is_clang) {
+ cflags += [ "-Wno-header-hygiene" ]
+ if (target_cpu == "x86" || target_cpu == "x64") {
+ cflags += [ "-msse2" ]
+ }
}
+
cflags += [
"-Wno-attributes",
"-Wno-deprecated-declarations",