[cfe-commits] r124325 - in /cfe/trunk/examples/PrintFunctionNames: Makefile README.txt
Nico Weber
nicolasweber at gmx.de
Wed Jan 26 13:28:52 PST 2011
Author: nico
Date: Wed Jan 26 15:28:52 2011
New Revision: 124325
URL: http://llvm.org/viewvc/llvm-project?rev=124325&view=rev
Log:
make `make` work in examples/PrintFucntionNames on Mac. I checked that it still works on Linux.
Modified:
cfe/trunk/examples/PrintFunctionNames/Makefile
cfe/trunk/examples/PrintFunctionNames/README.txt
Modified: cfe/trunk/examples/PrintFunctionNames/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/Makefile?rev=124325&r1=124324&r2=124325&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/Makefile (original)
+++ cfe/trunk/examples/PrintFunctionNames/Makefile Wed Jan 26 15:28:52 2011
@@ -18,7 +18,11 @@
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
Modified: cfe/trunk/examples/PrintFunctionNames/README.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/README.txt?rev=124325&r1=124324&r2=124325&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/README.txt (original)
+++ cfe/trunk/examples/PrintFunctionNames/README.txt Wed Jan 26 15:28:52 2011
@@ -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
More information about the cfe-commits
mailing list