[cfe-commits] r109436 - in /cfe/trunk/examples/PrintFunctionNames: Makefile PrintFunctionNames.exports

Dan Gohman gohman at apple.com
Mon Jul 26 14:12:10 PDT 2010


Author: djg
Date: Mon Jul 26 16:12:10 2010
New Revision: 109436

URL: http://llvm.org/viewvc/llvm-project?rev=109436&view=rev
Log:
Use an export file. Plugins must export llvm::Registry symbols.
Also, don't link in all the clang libraries statically.

Added:
    cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports
Modified:
    cfe/trunk/examples/PrintFunctionNames/Makefile

Modified: cfe/trunk/examples/PrintFunctionNames/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/Makefile?rev=109436&r1=109435&r2=109436&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/Makefile (original)
+++ cfe/trunk/examples/PrintFunctionNames/Makefile Mon Jul 26 16:12:10 2010
@@ -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

Added: cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports?rev=109436&view=auto
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports (added)
+++ cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports Mon Jul 26 16:12:10 2010
@@ -0,0 +1 @@
+_ZN4llvm8Registry*





More information about the cfe-commits mailing list