Kaydet (Commit) 2ac26dc8 authored tarafından Luboš Luňák's avatar Luboš Luňák

adjust clang plugins for srcdir != builddir

Change-Id: Ie4c934b52c4b010703e91f84b83e1fe590b5d187
üst c8c056fd
...@@ -37,7 +37,7 @@ CLANGINCLUDES=-I$(CLANGDIR)/include -I$(CLANGDIR)/tools/clang/include -I$(CLANGB ...@@ -37,7 +37,7 @@ CLANGINCLUDES=-I$(CLANGDIR)/include -I$(CLANGDIR)/tools/clang/include -I$(CLANGB
CLANGINDIR=$(SRCDIR)/compilerplugins/clang CLANGINDIR=$(SRCDIR)/compilerplugins/clang
# Cannot use $(WORKDIR), the plugin should survive even 'make clean', otherwise the rebuilt # Cannot use $(WORKDIR), the plugin should survive even 'make clean', otherwise the rebuilt
# plugin will cause cache misses with ccache. # plugin will cause cache misses with ccache.
CLANGOUTDIR=$(SRCDIR)/compilerplugins/obj CLANGOUTDIR=$(BUILDDIR)/compilerplugins/obj
compilerplugins: $(CLANGOUTDIR) $(CLANGOUTDIR)/plugin.so compilerplugins: $(CLANGOUTDIR) $(CLANGOUTDIR)/plugin.so
...@@ -63,7 +63,7 @@ endef ...@@ -63,7 +63,7 @@ endef
$(foreach src, $(CLANGSRC), $(eval $(call clangbuildsrc,$(src),$(CLANGINDIR)/$(src),$(CLANGOUTDIR)/$(src:.cxx=.o)))) $(foreach src, $(CLANGSRC), $(eval $(call clangbuildsrc,$(src),$(CLANGINDIR)/$(src),$(CLANGOUTDIR)/$(src:.cxx=.o))))
$(CLANGOUTDIR)/plugin.so: $(CLANGOBJS) $(CLANGOUTDIR)/plugin.so: $(CLANGOBJS)
@echo [build LNK] $(subst $(SRCDIR)/,,$@) @echo [build LNK] $(subst $(BUILDDIR)/,,$@)
$(CXX) -shared $(CLANGOBJS) -o $@ $(CXX) -shared $(CLANGOBJS) -o $@
# Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes. # Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes.
......
...@@ -161,9 +161,9 @@ gb_LinkTarget_INCLUDE :=\ ...@@ -161,9 +161,9 @@ gb_LinkTarget_INCLUDE :=\
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_GCC_IS_CLANG),TRUE)
ifeq ($(COMPILER_PLUGIN_TOOL),) ifeq ($(COMPILER_PLUGIN_TOOL),)
gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(SRCDIR)/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(BUILDDIR)/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin
else else
gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(SRCDIR)/compilerplugins/obj/plugin.so -Xclang -plugin -Xclang loplugin -Xclang -plugin-arg-loplugin -Xclang $(COMPILER_PLUGIN_TOOL) gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(BUILDDIR)/compilerplugins/obj/plugin.so -Xclang -plugin -Xclang loplugin -Xclang -plugin-arg-loplugin -Xclang $(COMPILER_PLUGIN_TOOL)
endif endif
# extra EF variable to make the command line shorter (just like is done with $(SRCDIR) etc.) # extra EF variable to make the command line shorter (just like is done with $(SRCDIR) etc.)
gb_COMPILER_PLUGINS_SETUP := EF=$(SRCDIR)/sal/inc/sal/log-areas.dox && ICECC_EXTRAFILES=$$EF CCACHE_EXTRAFILES=$$EF gb_COMPILER_PLUGINS_SETUP := EF=$(SRCDIR)/sal/inc/sal/log-areas.dox && ICECC_EXTRAFILES=$$EF CCACHE_EXTRAFILES=$$EF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment