summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-02-26 14:29:17 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-02-26 14:34:31 +0100
commita2dcac011a38294a6acb21ae7c69163fef6b4cef (patch)
tree7dc3189c7b9316dfeef64f218e74c2c7d33c8b0f /compilerplugins
parentaf89738d225f756bc37a6ff4fd647622f81e24ef (diff)
New COMPILER_PLUGINS_CXX to specify compiler to build Clang plugins with
...instead of trying to second-guess what to strip off $(CXX) to make it fit. Keep the old way for existing build scripts that rely on it. Change-Id: I145bdcba6d02002a9b653b4deb6e7f5a9c76cc8f
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/Makefile-clang.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 1e983098f315..868b5b0c9568 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -10,10 +10,14 @@
CLANG_COMMA :=,
-# You may occasionally want to override some of these
+ifeq ($(COMPILER_PLUGINS_CXX),)
CLANGCXX=$(filter-out -m32 -m64 -fsanitize=%,$(CXX))
+else
+CLANGCXX=$(COMPILER_PLUGINS_CXX)
+endif
-# Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin)
+# Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin); you
+# may occasionally want to override these:
CLANGCXXFLAGS=-O2 -Wall -Wextra -Wundef -g
# The uninteresting rest.