summaryrefslogtreecommitdiffstats
path: root/clang/examples/PrintFunctionNames
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-26 21:12:10 +0000
committerDan Gohman <gohman@apple.com>2010-07-26 21:12:10 +0000
commitc0539d2eb68feeb1596ffb31ce5cb2e0ae476d6e (patch)
tree159de89eb4ea70042f7fac2397a42968033c5ab2 /clang/examples/PrintFunctionNames
parent9306a8ec1b6bb83e97a8aab5e6da10650ed946e5 (diff)
downloadbcm5719-llvm-c0539d2eb68feeb1596ffb31ce5cb2e0ae476d6e.tar.gz
bcm5719-llvm-c0539d2eb68feeb1596ffb31ce5cb2e0ae476d6e.zip
Use an export file. Plugins must export llvm::Registry symbols.
Also, don't link in all the clang libraries statically. llvm-svn: 109436
Diffstat (limited to 'clang/examples/PrintFunctionNames')
-rw-r--r--clang/examples/PrintFunctionNames/Makefile11
-rw-r--r--clang/examples/PrintFunctionNames/PrintFunctionNames.exports1
2 files changed, 9 insertions, 3 deletions
diff --git a/clang/examples/PrintFunctionNames/Makefile b/clang/examples/PrintFunctionNames/Makefile
index 0ff5189437c..125ac4854ff 100644
--- a/clang/examples/PrintFunctionNames/Makefile
+++ b/clang/examples/PrintFunctionNames/Makefile
@@ -10,10 +10,15 @@
CLANG_LEVEL := ../..
LIBRARYNAME = PrintFunctionNames
+# If we don't need RTTI or EH, there's no reason to export anything
+# from the plugin.
+ifneq ($(REQUIRES_RTTI), 1)
+ifneq ($(REQUIRES_EH), 1)
+EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/PrintFunctionNames.exports
+endif
+endif
+
LINK_LIBS_IN_SHARED = 1
SHARED_LIBRARY = 1
-USEDLIBS = clangIndex.a clangFrontend.a clangDriver.a clangSema.a \
- clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a
-
include $(CLANG_LEVEL)/Makefile
diff --git a/clang/examples/PrintFunctionNames/PrintFunctionNames.exports b/clang/examples/PrintFunctionNames/PrintFunctionNames.exports
new file mode 100644
index 00000000000..0ff590d30d7
--- /dev/null
+++ b/clang/examples/PrintFunctionNames/PrintFunctionNames.exports
@@ -0,0 +1 @@
+_ZN4llvm8Registry*
OpenPOWER on IntegriCloud