diff options
Diffstat (limited to 'tools/llvmc2/plugins/Makefile')
-rw-r--r-- | tools/llvmc2/plugins/Makefile | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/llvmc2/plugins/Makefile b/tools/llvmc2/plugins/Makefile index 568752e..104e909 100644 --- a/tools/llvmc2/plugins/Makefile +++ b/tools/llvmc2/plugins/Makefile @@ -12,7 +12,7 @@ ifndef LLVMC_PLUGIN LEVEL = ../../.. DIRS = $(BUILTIN_PLUGINS) -# TOFIX: DSO versions of plugins are not built +# TOFIX: How to build DSO versions of plugins? export BUILTIN_LLVMC_PLUGIN=1 @@ -22,25 +22,28 @@ else # LLVMC_PLUGIN LEVEL = ../../../.. -LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) -TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td) +LIBRARYNAME := $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) REQUIRES_EH = 1 ifndef BUILTIN_LLVMC_PLUGIN LOADABLE_MODULE = 1 endif -ifneq ($(TOOLS_SOURCE),"") -BUILD_AUTOGENERATED_INC=1 +# This probably breaks the build with $ObjDir != $SrcDir +TOOLS_SOURCE := $(strip $(wildcard *.td)) + +ifneq ($(TOOLS_SOURCE),) +BUILD_AUTOGENERATED_INC = 1 BUILT_SOURCES = AutoGenerated.inc endif include $(LEVEL)/Makefile.common -# TOFIX: This should go into Makefile.rules +# TOFIX: This probably should go into Makefile.rules ifdef BUILD_AUTOGENERATED_INC -TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td) +TD_COMMON :=$(strip $(wildcard \ + $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) $(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \ $(TBLGEN) $(TD_COMMON) |