diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-10-05 18:17:13 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-10-09 17:25:27 +0200 |
commit | 02a8d36ebf3d54784903f2899eafe010bedf2f4c (patch) | |
tree | 61ba648242b1356b7da72336073b91e397814e50 /solenv/gbuild/platform | |
parent | 7b34748b1bfd8b5fe0406c1f6bdaaa585d7bc4c3 (diff) |
initial support for clang compiler plugins
The plugin is intentionally built using a custom Makefile,
because it's used by gbuild, so I don't want to build the plugin
using gbuild too. It is also intentionally not placed under workdir/,
as that is cleaned by 'make clean', the plugin is cleaned only
by 'make distclean', so that cleaning it doesn't cause ccache misses.
No actual functionality in the plugin itself yet.
Change-Id: Ic05eba8d6260eec123c9e699eb5385abfe1b832f
Diffstat (limited to 'solenv/gbuild/platform')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_class.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index 630eed78c560..aa00267222f0 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -60,6 +60,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ + $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \ $(T_CFLAGS) \ -c $(3) \ -o $(1) \ @@ -82,6 +83,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \ + $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \ $(T_CXXFLAGS) \ -c $(3) \ -o $(1) \ diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 1e349f0a8325..0cc32b52505b 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -153,6 +153,12 @@ gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE) gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) +ifeq ($(COM_GCC_IS_CLANG),TRUE) +gb_COMPILER_PLUGINS :=-Xclang -load -Xclang $(SRCDIR)/compilerplugins/obj/compileplugin.so -Xclang -add-plugin -Xclang loplugin +else +gb_COMPILER_PLUGINS := +endif + # Executable class gb_Executable_EXT_for_build := |