Only add extra warnings when building in standalone.

This avoids breaking dependents when they use a version of clang that's
different than the one being tested on Dawn CQ.

Also re-enable -Wdeprecated-copy(-dtor)

Bug: chromium:1201858
Change-Id: I09763fdb98e7dba53b4d9fa66fa4c606620a0078
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49100
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn
index 570cf54..ebb8771 100644
--- a/src/common/BUILD.gn
+++ b/src/common/BUILD.gn
@@ -89,12 +89,17 @@
 
   cflags = []
 
-  # Enable more warnings that were found when using Dawn in other projects
-  if (is_clang) {
+  # Enable more warnings that were found when using Dawn in other projects.
+  # Add them only when building in standalone because we control which clang
+  # version we use. Otherwise we risk breaking projects depending on Dawn when
+  # the use a different clang version.
+  if (dawn_standalone && is_clang) {
     cflags += [
       "-Wconditional-uninitialized",
       "-Wcstring-format-directive",
       "-Wc++11-narrowing",
+      "-Wdeprecated-copy",
+      "-Wdeprecated-copy-dtor",
       "-Wduplicate-enum",
       "-Wextra-semi-stmt",
       "-Wimplicit-fallthrough",