diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-02-26 14:29:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-02-26 14:34:31 +0100 |
commit | a2dcac011a38294a6acb21ae7c69163fef6b4cef (patch) | |
tree | 7dc3189c7b9316dfeef64f218e74c2c7d33c8b0f | |
parent | af89738d225f756bc37a6ff4fd647622f81e24ef (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
-rw-r--r-- | compilerplugins/Makefile-clang.mk | 8 | ||||
-rw-r--r-- | config_host.mk.in | 1 | ||||
-rw-r--r-- | configure.ac | 1 |
3 files changed, 8 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. diff --git a/config_host.mk.in b/config_host.mk.in index 8becc9ef4cfb..89081ca0dbf7 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -68,6 +68,7 @@ export COMMONS_LOGGING_JAR=@COMMONS_LOGGING_JAR@ export COMMONS_LOGGING_VERSION=@COMMONS_LOGGING_VERSION@ export COMPATH=@COMPATH@ export COMPILER_PLUGINS=@COMPILER_PLUGINS@ +export COMPILER_PLUGINS_CXX=@COMPILER_PLUGINS_CXX@ export COM_IS_CLANG=@COM_IS_CLANG@ export CPPUNIT_CFLAGS=$(gb_SPACE)@CPPUNIT_CFLAGS@ export CPPUNIT_LIBS=$(gb_SPACE)@CPPUNIT_LIBS@ diff --git a/configure.ac b/configure.ac index 18c89ab368bc..6b405e434054 100644 --- a/configure.ac +++ b/configure.ac @@ -6735,6 +6735,7 @@ else fi fi AC_SUBST(COMPILER_PLUGINS) +AC_SUBST(COMPILER_PLUGINS_CXX) AC_SUBST(CLANGDIR) # Plugin to help linker. |