diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-26 21:12:10 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-26 21:12:10 +0000 |
commit | b02d96bd7cea40aa51c25034f830fa9438b17af4 (patch) | |
tree | dc92c924457812b3a9079f16296711ef6c704196 /examples/PrintFunctionNames | |
parent | f762905bdefad77f91c7c6782a9c17e6b274d393 (diff) |
Use an export file. Plugins must export llvm::Registry symbols.
Also, don't link in all the clang libraries statically.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/PrintFunctionNames')
-rw-r--r-- | examples/PrintFunctionNames/Makefile | 11 | ||||
-rw-r--r-- | examples/PrintFunctionNames/PrintFunctionNames.exports | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/examples/PrintFunctionNames/Makefile b/examples/PrintFunctionNames/Makefile index 0ff5189437..125ac4854f 100644 --- a/examples/PrintFunctionNames/Makefile +++ b/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/examples/PrintFunctionNames/PrintFunctionNames.exports b/examples/PrintFunctionNames/PrintFunctionNames.exports new file mode 100644 index 0000000000..0ff590d30d --- /dev/null +++ b/examples/PrintFunctionNames/PrintFunctionNames.exports @@ -0,0 +1 @@ +_ZN4llvm8Registry* |