]> granicus.if.org Git - clang/commitdiff
make `make` work in examples/PrintFucntionNames on Mac. I checked that it still works...
authorNico Weber <nicolasweber@gmx.de>
Wed, 26 Jan 2011 21:28:52 +0000 (21:28 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 26 Jan 2011 21:28:52 +0000 (21:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124325 91177308-0d34-0410-b5e6-96231b3b80d8

examples/PrintFunctionNames/Makefile
examples/PrintFunctionNames/README.txt

index 125ac4854ffc799f950afd80261482215c39f0fc..23a53054019d126efc3a4ed71fbe59a6f5d1b5f6 100644 (file)
@@ -18,7 +18,11 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/PrintFunctionNames.exports
 endif
 endif
 
-LINK_LIBS_IN_SHARED = 1
+LINK_LIBS_IN_SHARED = 0
 SHARED_LIBRARY = 1
 
 include $(CLANG_LEVEL)/Makefile
+
+ifeq ($(OS),Darwin)
+  LDFLAGS=-Wl,-undefined,dynamic_lookup
+endif
index f0f5ba6136d39da345c8b15d95a059d16f8b419c..4c284cd170d5cb2d6cecd98948aa68bd73c9d880 100644 (file)
@@ -1,10 +1,12 @@
 This is a simple example demonstrating how to use clang's facility for
 providing AST consumers using a plugin.
 
-You will probably need to build clang so that it exports all symbols (disable
-TOOL_NO_EXPORT in the tools/clang Makefile).
+Build the plugin by running `make` in this directory.
 
 Once the plugin is built, you can run it using:
 --
-$ clang -cc1 -load path/to/libPrintFunctionNames.so -plugin print-fns some-input-file.c
---
+Linux:
+$ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.so -plugin print-fns some-input-file.c
+
+Mac:
+$ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.dylib -plugin print-fns some-input-file.c