Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 0cba95ff63396ac21889680191dd8777050cce26..048f871588ebfd2f91f87dae8184b877617ae6da 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -1007,17 +1007,14 @@ config("default_warnings") { |
"-Wno-inconsistent-missing-override", |
] |
- # NaCl's Clang compiler and Chrome's hermetic Clang compiler will almost |
- # always have different versions. Certain flags may not be recognized by |
- # one version or the other. |
+ # Chrome's hermetic Clang compiler, NaCl's Clang compiler and the system |
+ # Clang compiler will almost always have different versions. Certain flags |
+ # may not be recognized by one version or the other. |
if (!is_nacl) { |
# Flags NaCl (Clang 3.7) does not recognize. |
cflags += [ |
# TODO(thakis): Enable this, crbug.com/507717 |
"-Wno-shift-negative-value", |
- |
- # TODO(thakis): https://crbug.com/604888 |
- "-Wno-undefined-var-template", |
] |
if (llvm_force_head_revision) { |
@@ -1027,6 +1024,13 @@ config("default_warnings") { |
] |
} |
} |
+ if (!is_nacl && !use_system_clang) { |
+ # Flags NaCl (Clang 3.7) does not recognize. |
+ cflags += [ |
+ # TODO(thakis): https://crbug.com/604888 |
+ "-Wno-undefined-var-template", |
+ ] |
+ } |
} |
} |