summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-08-15 07:07:12 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-08-15 07:07:12 +0000
commitb3d36293c2b7d5f4b53f3f907f97264309205c23 (patch)
tree9e3c0c04e35dd73864cced2cb17c5fb77e973f80 /Makefile.rules
parentc0b2a2018ad194de6a9cf46a2a5936319787f1b1 (diff)
downloadllvm-b3d36293c2b7d5f4b53f3f907f97264309205c23.tar.gz
llvm-b3d36293c2b7d5f4b53f3f907f97264309205c23.tar.bz2
llvm-b3d36293c2b7d5f4b53f3f907f97264309205c23.tar.xz
llvmc: remove dynamic plugins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules74
1 files changed, 19 insertions, 55 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 056a0ea3ef..2e14094b3a 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -196,57 +196,15 @@ install-local:: all-local
install-bytecode:: install-bytecode-local
###############################################################################
-# LLVMC: Provide rules for compiling llvmc plugins
+# LLVMC: Provide rules for compiling llvmc-based driver
###############################################################################
-ifdef LLVMC_PLUGIN
-
-LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN))
-CPP.Flags += -DLLVMC_PLUGIN_NAME=$(LLVMC_PLUGIN)
-
-ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
- LD.Flags += -lCompilerDriver
-endif
-
-# Build a dynamic library if the user runs `make` directly from the plugin
-# directory.
-ifndef LLVMC_BUILTIN_PLUGIN
- LOADABLE_MODULE = 1
-endif
-
-# TableGen stuff...
-ifneq ($(BUILT_SOURCES),)
- LLVMC_BUILD_AUTOGENERATED_INC=1
-endif
-
-endif # LLVMC_PLUGIN
-
ifdef LLVMC_BASED_DRIVER
TOOLNAME = $(LLVMC_BASED_DRIVER)
-ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
- LD.Flags += -lCompilerDriver
-else
- LLVMLIBS = CompilerDriver.a
- LINK_COMPONENTS = support system
-endif
-
-# Preprocessor magic that generates references to static variables in built-in
-# plugins.
-ifneq ($(LLVMC_BUILTIN_PLUGINS),)
-
-USEDLIBS += $(patsubst %,plugin_llvmc_%.a,$(LLVMC_BUILTIN_PLUGINS))
-
-LLVMC_BUILTIN_PLUGINS.pre := \
- $(patsubst %,-DLLVMC_BUILTIN_PLUGIN_%=, \
- 1 2 3 4 5 6 7 8 9 10)
-
-CPP.Flags += \
- $(filter-out $(LLVMC_BUILTIN_PLUGINS.pre) $(LLVMC_BUILTIN_PLUGINS), \
- $(join $(LLVMC_BUILTIN_PLUGINS.pre), $(LLVMC_BUILTIN_PLUGINS)))
-
-endif
+LLVMLIBS = CompilerDriver.a
+LINK_COMPONENTS = support system
endif # LLVMC_BASED_DRIVER
@@ -1601,7 +1559,7 @@ ifdef TARGET
TABLEGEN_INC_FILES_COMMON = 1
endif
-ifdef LLVMC_BUILD_AUTOGENERATED_INC
+ifdef LLVMC_BASED_DRIVER
TABLEGEN_INC_FILES_COMMON = 1
endif
@@ -1725,20 +1683,26 @@ clean-local::
endif # TARGET
-ifdef LLVMC_BUILD_AUTOGENERATED_INC
+ifdef LLVMC_BASED_DRIVER
+
+TDSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \
+ $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td)))
-LLVMCPluginSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \
- $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td)))
+TDCommon := $(strip $(wildcard \
+ $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td))
-TDFiles := $(LLVMCPluginSrc) \
- $(strip $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td))
+TDFiles := $(TDSrc) $(TDCommon)
-$(ObjDir)/AutoGenerated.inc.tmp: $(LLVMCPluginSrc) $(ObjDir)/.dir \
- $(TBLGEN) $(TD_COMMON)
- $(Echo) "Building LLVMC configuration library with tblgen"
+$(INCTMPFiles) : $(TBLGEN) $(TDFiles)
+
+$(ObjDir)/%.inc.tmp: %.td $(ObjDir)/.dir
+ $(Echo) "Building LLVMC compilation graph description with tblgen"
$(Verb) $(TableGen) -gen-llvmc -o $(call SYSPATH, $@) $<
-endif # LLVMC_BUILD_AUTOGENERATED_INC
+clean-local::
+ -$(Verb) $(RM) -f $(INCFiles)
+
+endif # LLVMC_BASED_DRIVER
###############################################################################
# OTHER RULES: Other rules needed