Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: build/config/compiler/BUILD.gn

Issue 2717493002: Fix repeated "-Wunknown-pragmas -Wno-error=unknown-pragmas". (Closed)
Patch Set: Fix grammar errors. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/grit/grit_rule.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 8f5712039c167f581c359ebcc3ded33bf3fc076c..894a806168c14f91e2dd67f92e75c477b1f1a0c8 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1691,6 +1691,20 @@ config("no_symbols") {
}
}
+# On Linux and Android, the "grit" template wants to disable the warning about
+# unknown pragmas. However since gn does not deduplicate the flags from configs
+# but only the config themselves, if the template declares a "config" for that
+# purpose, the flag will end up being repeated for each dependent "grit" target.
+# Using a separate config solves this problem.
+config("disable_unknown_pragma") {
+ if (is_clang) {
+ cflags = [
+ "-Wunknown-pragmas",
+ "-Wno-error=unknown-pragmas",
+ ]
+ }
+}
+
# Default symbols.
config("default_symbols") {
if (symbol_level == 0) {
« no previous file with comments | « no previous file | tools/grit/grit_rule.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698