Only use -Wno-shadow on clang builds.
SwiftShader is also built in msvc where this flag does not exist.
Bug: chromium:794619
Change-Id: I3ac66166eb4e09a9e923281d1d1e75314097e808
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/57368
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Commit-Queue: Geoff Lang <geofflang@google.com>
Tested-by: Geoff Lang <geofflang@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 37f7de1..53b1d82 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -15,10 +15,14 @@
import("src/Reactor/reactor.gni")
config("swiftshader_config") {
- cflags = [ "-Wno-shadow" ]
+ cflags = []
defines = []
asmflags = []
+ if (is_clang) {
+ cflags += [ "-Wno-shadow" ]
+ }
+
if (!is_debug) {
defines += [ "ANGLE_DISABLE_TRACE" ]
}