[llvm-commits] [gcc-plugin] r79522 - /gcc-plugin/trunk/README

Duncan Sands baldrick at free.fr
Thu Aug 20 01:15:28 PDT 2009


Author: baldrick
Date: Thu Aug 20 03:15:27 2009
New Revision: 79522

URL: http://llvm.org/viewvc/llvm-project?rev=79522&view=rev
Log:
Build and usage instructions for the plugin.

Added:
    gcc-plugin/trunk/README

Added: gcc-plugin/trunk/README
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/README?rev=79522&view=auto

==============================================================================
--- gcc-plugin/trunk/README (added)
+++ gcc-plugin/trunk/README Thu Aug 20 03:15:27 2009
@@ -0,0 +1,39 @@
+----------------------
+- BUILD INSTRUCTIONS -
+----------------------
+
+Step 1: Build gcc
+-----------------
+
+Check out gcc mainline from the gcc subversion repository:
+  svn checkout svn://gcc.gnu.org/svn/gcc/trunk SomeLocalDir
+Apply the patches in the gcc-patches subdirectory, if any.  Hopefully one day
+the plugin will work with an unpatched gcc, but for the moment a few small
+patches need to be applied.
+Build gcc, and install it somewhere.
+
+Step 2: Build the plugin
+------------------------
+
+In the Makefile, set the GCCSOURCE_DIR variable to point to the place you
+checked out the gcc repository, rather than to where I checked it out.
+Set the GCCOBJECT_DIR to point to the place you built the repository.
+Admire the awfulness of the build system, and make a mental note to rewrite
+it properly.
+
+Build the plugin using "make".  The end result of the build is a shared
+library, llvm.so.
+
+----------------------
+- USAGE INSTRUCTIONS -
+----------------------
+
+Run gcc as usual, but pass -fplugin=./llvm.so as an extra command line argument.
+Make sure you use the gcc you installed above, not the system gcc!
+
+Currently the plugin isn't capable of compiling much - you have been warned.
+
+The plugin accepts a few command line arguments, for example
+-fplugin-arg-llvm-enable-gcc-optzns
+Search for the comment "Process any plugin arguments" in llvm-backend.cpp,
+the argument parsing code is just after this.





More information about the llvm-commits mailing list