LEVEL = ../../..
DIRS = $(BUILTIN_PLUGINS)
-# TOFIX: How to build DSO versions of plugins?
+# TOFIX: DSO versions of plugins are not built
export BUILTIN_LLVMC_PLUGIN=1
LEVEL = ../../../..
-LIBRARYNAME := $(patsubst %,LLVMC%,$(LLVMC_PLUGIN))
+LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN))
+TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td)
REQUIRES_EH = 1
ifndef BUILTIN_LLVMC_PLUGIN
LOADABLE_MODULE = 1
endif
-# This probably breaks the build with $ObjDir != $SrcDir
-TOOLS_SOURCE := $(strip $(wildcard *.td))
-
-ifneq ($(TOOLS_SOURCE),)
-BUILD_AUTOGENERATED_INC = 1
+ifneq ($(TOOLS_SOURCE),"")
+BUILD_AUTOGENERATED_INC=1
BUILT_SOURCES = AutoGenerated.inc
endif
include $(LEVEL)/Makefile.common
-# TOFIX: This probably should go into Makefile.rules
+# TOFIX: This should go into Makefile.rules
ifdef BUILD_AUTOGENERATED_INC
-TD_COMMON :=$(strip $(wildcard \
- $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td))
+TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)
$(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \
$(TBLGEN) $(TD_COMMON)
+++ /dev/null
-##===- tools/llvmc2/plugins/Simple/Makefile ------------------*- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-LLVMC_PLUGIN = Simple
-
-include ../Makefile
+++ /dev/null
-// A simple wrapper for gcc.
-// To compile, use this command:
-//
-// $ cd $LLVMC2_DIR
-// $ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple
-//
-// To build this plugin as a dynamic library:
-//
-// $ cd $LLVMC2_DIR
-// $ make BUILTIN_PLUGINS=""
-// $ cd plugins/Simple
-// $ make
-//
-// Run as:
-//
-// $ llvmc2 -load $LLVM_DIR/Release/lib/LLVMCSimple.so
-
-include "llvm/CompilerDriver/Common.td"
-
-def gcc : Tool<
-[(in_language "c"),
- (out_language "executable"),
- (output_suffix "out"),
- (cmd_line "gcc $INFILE -o $OUTFILE"),
- (sink)
-]>;
-
-def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>;
-
-def CompilationGraph : CompilationGraph<[Edge<root, gcc>]>;