Skip to content

Commit 5b26461

Browse files
committed
Sphinxify the outdated Packaging documentation.
llvm-svn: 158901
1 parent 8c2ad81 commit 5b26461

File tree

3 files changed

+77
-120
lines changed

3 files changed

+77
-120
lines changed

llvm/docs/Packaging.html

Lines changed: 0 additions & 119 deletions
This file was deleted.

llvm/docs/Packaging.rst

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
.. _packaging:
2+
3+
========================
4+
Advice on Packaging LLVM
5+
========================
6+
7+
.. contents::
8+
:local:
9+
10+
Overview
11+
========
12+
13+
LLVM sets certain default configure options to make sure our developers don't
14+
break things for constrained platforms. These settings are not optimal for most
15+
desktop systems, and we hope that packagers (e.g., Redhat, Debian, MacPorts,
16+
etc.) will tweak them. This document lists settings we suggest you tweak.
17+
18+
LLVM's API changes with each release, so users are likely to want, for example,
19+
both LLVM-2.6 and LLVM-2.7 installed at the same time to support apps developed
20+
against each.
21+
22+
Compile Flags
23+
=============
24+
25+
LLVM runs much more quickly when it's optimized and assertions are removed.
26+
However, such a build is currently incompatible with users who build without
27+
defining ``NDEBUG``, and the lack of assertions makes it hard to debug problems
28+
in user code. We recommend allowing users to install both optimized and debug
29+
versions of LLVM in parallel. The following configure flags are relevant:
30+
31+
``--disable-assertions``
32+
Builds LLVM with ``NDEBUG`` defined. Changes the LLVM ABI. Also available
33+
by setting ``DISABLE_ASSERTIONS=0|1`` in ``make``'s environment. This
34+
defaults to enabled regardless of the optimization setting, but it slows
35+
things down.
36+
37+
``--enable-debug-symbols``
38+
Builds LLVM with ``-g``. Also available by setting ``DEBUG_SYMBOLS=0|1`` in
39+
``make``'s environment. This defaults to disabled when optimizing, so you
40+
should turn it back on to let users debug their programs.
41+
42+
``--enable-optimized``
43+
(For svn checkouts) Builds LLVM with ``-O2`` and, by default, turns off
44+
debug symbols. Also available by setting ``ENABLE_OPTIMIZED=0|1`` in
45+
``make``'s environment. This defaults to enabled when not in a
46+
checkout.
47+
48+
C++ Features
49+
============
50+
51+
RTTI
52+
LLVM disables RTTI by default. Add ``REQUIRES_RTTI=1`` to your environment
53+
while running ``make`` to re-enable it. This will allow users to build with
54+
RTTI enabled and still inherit from LLVM classes.
55+
56+
Shared Library
57+
==============
58+
59+
Configure with ``--enable-shared`` to build
60+
``libLLVM-<major>.<minor>.(so|dylib)`` and link the tools against it. This
61+
saves lots of binary size at the cost of some startup time.
62+
63+
Dependencies
64+
============
65+
66+
``--enable-libffi``
67+
Depend on `libffi <http://sources.redhat.com/libffi/>`_ to allow the LLVM
68+
interpreter to call external functions.
69+
70+
``--with-oprofile``
71+
72+
Depend on `libopagent
73+
<http://oprofile.sourceforge.net/doc/devel/index.html>`_ (>=version 0.9.4)
74+
to let the LLVM JIT tell oprofile about function addresses and line
75+
numbers.

llvm/docs/userguides.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ User Guides
1010
DeveloperPolicy
1111
FAQ
1212
Lexicon
13+
Packaging
1314

1415
* `The LLVM Getting Started Guide <GettingStarted.html>`_
1516

@@ -67,7 +68,7 @@ User Guides
6768

6869
Instructions for building the clang front-end from source.
6970

70-
* `Packaging guide <Packaging.html>`_
71+
* :ref:`packaging`
7172

7273
Advice on packaging LLVM into a distribution.
7374

0 commit comments

Comments
 (0)