From ece02cd5829cea836e9365b0845a8ef042d17b0a Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 12 Jun 2011 15:42:51 +0000 Subject: Vendor import of llvm trunk r132879: http://llvm.org/svn/llvm-project/llvm/trunk@132879 --- docs/Projects.html | 62 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 17 deletions(-) (limited to 'docs/Projects.html') diff --git a/docs/Projects.html b/docs/Projects.html index 3c6d4ad..068acde 100644 --- a/docs/Projects.html +++ b/docs/Projects.html @@ -49,7 +49,7 @@ these facilities, a Makefile from a project must do the following things:

  • PROJ_SRC_ROOT - The root of the project's source tree.
  • PROJ_OBJ_ROOT - The root of the project's object tree.
  • PROJ_INSTALL_ROOT - The root installation directory.
  • -
  • LEVEL - The relative path from the current directory to the +
  • LEVEL - The relative path from the current directory to the project's root ($PROJ_OBJ_ROOT).
  • Include Makefile.config from $(LLVM_OBJ_ROOT).
  • @@ -59,9 +59,9 @@ these facilities, a Makefile from a project must do the following things:

    There are two ways that you can set all of these variables:

    1. You can write your own Makefiles which hard-code these values.
    2. -
    3. You can use the pre-made LLVM sample project. This sample project - includes Makefiles, a configure script that can be used to configure the - location of LLVM, and the ability to support multiple object directories +
    4. You can use the pre-made LLVM sample project. This sample project + includes Makefiles, a configure script that can be used to configure the + location of LLVM, and the ability to support multiple object directories from a single source directory.
    @@ -88,9 +88,9 @@ choosing. You can place it anywhere you like. Rename the directory to match the name of your project.
  • -If you downloaded LLVM using Subversion, remove all the directories named .svn -(and all the files therein) from your project's new source tree. This will -keep Subversion from thinking that your project is inside +If you downloaded LLVM using Subversion, remove all the directories named .svn +(and all the files therein) from your project's new source tree. This will +keep Subversion from thinking that your project is inside llvm/trunk/projects/sample.
  • Add your source code and Makefiles to your source tree.
  • @@ -139,7 +139,7 @@ can find LLVM:

    That's it! Now all you have to do is type gmake (or make -if your on a GNU/Linux system) in the root of your object directory, and your +if your on a GNU/Linux system) in the root of your object directory, and your project should build.

    @@ -209,7 +209,7 @@ directories:

    test procedure uses RUN lines in the actual test case to determine how to run the test. See the TestingGuide for more details. You - can easily write Makefile support similar to the Makefiles in + can easily write Makefile support similar to the Makefiles in llvm/test to use Dejagnu to run your project's tests.
  • LLVM contains an optional package called llvm-test @@ -339,16 +339,41 @@ do:

    USEDLIBS
    - This variable holds a space separated list of libraries that - should be linked into the program. These libraries must either - be LLVM libraries or libraries that come from your lib - directory. The libraries must be specified by their base name. - For example, to link libsample.a, you would set USEDLIBS to - sample. + This variable holds a space separated list of libraries that should + be linked into the program. These libraries must be libraries that + come from your lib directory. The libraries must be + specified without their "lib" prefix. For example, to link + libsample.a, you would set USEDLIBS to + sample.a.

    Note that this works only for statically linked libraries.

    +

    LLVMLIBS +
    + This variable holds a space separated list of libraries that should + be linked into the program. These libraries must be LLVM libraries. + The libraries must be specified without their "lib" prefix. For + example, to link with a driver that performs an IR transformation + you might set LLVMLIBS to this minimal set of libraries + LLVMSupport.a LLVMCore.a LLVMBitReader.a LLVMAsmParser.a LLVMAnalysis.a LLVMTransformUtils.a LLVMScalarOpts.a LLVMTarget.a. +

    + Note that this works only for statically linked libraries. LLVM is + split into a large number of static libraries, and the list of libraries you + require may be much longer than the list above. To see a full list + of libraries use: + llvm-config --libs all. + Using LINK_COMPONENTS as described below, obviates the need to set LLVMLIBS. +

    + +

    LINK_COMPONENTS +
    This variable holds a space separated list of components that + the LLVM Makefiles pass to the llvm-config tool to generate + a link line for the program. For example, to link with all LLVM + libraries use + LINK_COMPONENTS = all. +

    +

    LIBS
    To link dynamic libraries, add -l<library base name> to @@ -361,6 +386,9 @@ do:

    LIBS += -lsample +

    + Note that LIBS must occur in the Makefile after the inclusion of Makefile.common. +

    @@ -441,7 +469,7 @@ href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developers Mailing List.

    - +
    @@ -453,7 +481,7 @@ Mailing List.

    John Criswell
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2011-04-23 02:30:22 +0200 (Sat, 23 Apr 2011) $ + Last modified: $Date: 2011-06-03 04:20:48 +0200 (Fri, 03 Jun 2011) $
    -- cgit v1.1