X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FProjects.html;h=da4b06452b59c400e4a000438d748a72b0f7650f;hb=3bf15ced2b91661ac314911c1f28332da0e1c37c;hp=049d199d7ebaaf114aeb355d99508d869e1b9faa;hpb=0fb684dae2eba3aa257506dd9662cef7bb86f093;p=oota-llvm.git diff --git a/docs/Projects.html b/docs/Projects.html index 049d199d7eb..da4b06452b5 100644 --- a/docs/Projects.html +++ b/docs/Projects.html @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Creating an LLVM Project @@ -339,16 +340,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 +387,9 @@ do:

LIBS += -lsample +

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