From 21ac25144dce58cbe466a4d9da060fe4e5dcbbce Mon Sep 17 00:00:00 2001
From: Andrew Trick
Date: Fri, 3 Jun 2011 02:20:48 +0000
Subject: [PATCH] Corrections and additional information for "Creating and LLVM
Project" documentation. This should now reflect the current state of LLVM
Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132527 91177308-0d34-0410-b5e6-96231b3b80d8
---
docs/Projects.html | 40 ++++++++++++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/docs/Projects.html b/docs/Projects.html
index 049d199d7eb..910ebdb426d 100644
--- a/docs/Projects.html
+++ b/docs/Projects.html
@@ -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.
+
--
2.34.1