aboutsummaryrefslogtreecommitdiff
path: root/tools/llvmc/example/Skeleton/driver
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-03-03 11:02:48 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-03-03 11:02:48 +0000
commit283bb58332ed7f914fe3dc6d6929b6fdbae7d9fe (patch)
treea5e3c9024366a3101e69c4074ebd809f5a8c8ea3 /tools/llvmc/example/Skeleton/driver
parent03c050f018a07d93dc0a2a63a78145fef7c30f1f (diff)
Add example/Skeleton.
This is a template that can be used to build your own LLVMC-based drivers. It can be also useful as a "bare-bones" LLVMC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc/example/Skeleton/driver')
-rw-r--r--tools/llvmc/example/Skeleton/driver/Main.cpp14
-rw-r--r--tools/llvmc/example/Skeleton/driver/Makefile22
2 files changed, 36 insertions, 0 deletions
diff --git a/tools/llvmc/example/Skeleton/driver/Main.cpp b/tools/llvmc/example/Skeleton/driver/Main.cpp
new file mode 100644
index 0000000000..b1f5b6798a
--- /dev/null
+++ b/tools/llvmc/example/Skeleton/driver/Main.cpp
@@ -0,0 +1,14 @@
+//===--- Main.cpp - The LLVM Compiler Driver -------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open
+// Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Just include CompilerDriver/Main.inc.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CompilerDriver/Main.inc"
diff --git a/tools/llvmc/example/Skeleton/driver/Makefile b/tools/llvmc/example/Skeleton/driver/Makefile
new file mode 100644
index 0000000000..bf6d7a588d
--- /dev/null
+++ b/tools/llvmc/example/Skeleton/driver/Makefile
@@ -0,0 +1,22 @@
+##===- llvmc/example/Skeleton/driver/Makefile --------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open
+# Source License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = $(LLVMC_BASE_LEVEL)/..
+
+TOOLNAME = $(LLVMC_BASED_DRIVER_NAME)
+LLVMLIBS = CompilerDriver
+
+ifneq ($(LLVMC_BUILTIN_PLUGINS),)
+USEDLIBS += $(patsubst %,plugin_llvmc_%,$(LLVMC_BUILTIN_PLUGINS))
+endif
+
+LINK_COMPONENTS = support system
+REQUIRES_EH := 1
+
+include $(LEVEL)/Makefile.common