summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-05-31 18:58:38 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-05-31 20:00:54 +0200
commitc4cca49f49408bc4094bdfcf782de2f7cd16ce6a (patch)
treea339d7bcb84a8102e0366c6c856be99106043afa /compilerplugins
parent6b1f64ed09edcd712460123fbc32bc41cf81c321 (diff)
obey --enable-werror when building clang plugin
Change-Id: I8ca9b09a6ffd4b2f00740563fa9682fdabb26b3d
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/Makefile-clang.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 04b938f4451c..3e7ef9339fdc 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -31,6 +31,10 @@ CLANGOUTDIR=$(BUILDDIR)/compilerplugins/obj
QUIET=$(if $(VERBOSE)$(verbose),,@)
+ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
+CLANGWERROR := -Werror
+endif
+
compilerplugins: compilerplugins-build
# The list of source files, generated automatically (all files in clang/, but not subdirs).
@@ -69,7 +73,7 @@ CLANGOBJS=
define clangbuildsrc
$(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
- $(QUIET)$(CXX) $(CLANGCXXFLAGS) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC -std=c++11 -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
+ $(QUIET)$(CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC -std=c++11 -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
-include $(CLANGOUTDIR)/$(1).d