summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-27 13:09:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-27 13:12:33 +0100
commit1f078fcaddd45bb074e4d0a4933db01f6e8b623e (patch)
treeb3c91e350f82022ff0a4d2d20f89ea050b6ea69b /solenv
parenta94f0f92e8b09f6cd3989b646500ff5814274621 (diff)
Prepare dual-mode compiler plugin feature
...which can act as either a rewriter or a non-rewriter that emits warnings. Also added COMPILER_PLUGIN_WARNINGS_ONLY=X to demote warnings from plugin X from errors to warnings, even under --enable-werror. Change-Id: I05361936240a890515c6bba2459565417c1746b7
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index b53f72fbc57e..41c2d44cbca4 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -154,6 +154,10 @@ gb_LinkTarget_INCLUDE :=\
ifeq ($(COM_GCC_IS_CLANG),TRUE)
ifeq ($(COMPILER_PLUGIN_TOOL),)
gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(BUILDDIR)/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin
+ifneq ($(COMPILER_PLUGIN_WARNINGS_ONLY),)
+gb_COMPILER_PLUGINS += -Xclang -plugin-arg-loplugin -Xclang \
+ --warnings-only='$(COMPILER_PLUGIN_WARNINGS_ONLY)'
+endif
else
gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(BUILDDIR)/compilerplugins/obj/plugin.so -Xclang -plugin -Xclang loplugin -Xclang -plugin-arg-loplugin -Xclang $(COMPILER_PLUGIN_TOOL)
ifneq ($(UPDATE_FILES),)