llvm.org GIT mirror llvm / 3ab7136
Made the Requirements information its own major section and moved it between the "Getting Started Quickly" and "Getting Started Slowly" sections. :) Removed some of the nit-picky requirements information (i.e. GNU tar and GNU zip). Attempted to compact the requirements information so that it is less scary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9290 91177308-0d34-0410-b5e6-96231b3b80d8 John Criswell 15 years ago
1 changed file(s) with 132 addition(s) and 153 deletion(s). Raw diff Collapse all Expand all
1818
1919
2020
  • Overview
  • 21
  • Getting Started Quickly (A Summary)
  • 22
  • Requirements
  • 2123
    22
  • Requirements
  • 23
    24
  • Hardware
  • 25
  • Software
  • 26 </ol>
    24 <li>Hardware>
    25
  • Software
  • 2726
    28
  • Getting Started Quickly (A Summary)
  • 27
    2928
  • Getting Started with LLVM
  • 3029
    3130
  • Terminology and Notation
  • 6665

    6766 First, LLVM comes in two pieces. The first piece is the LLVM suite. This
    6867 contains all of the tools, libraries, and header files needed to use the
    69 low level virtual machine. It also contains a test suite that can be used
    70 to test the LLVM tools and the GCC front end.
    68 low level virtual machine. It contains an assembler, disassembler,
    69 bytecode analyzer, and bytecode optimizer. It also contains a test suite
    70 that can be used to test the LLVM tools and the GCC front end.
    7171

    7272 The second piece is the GCC front end. This component provides a version
    7373 of GCC that compiles C and C++ code into LLVM bytecode. Currently, the
    7676 manipulated with the LLVM tools from the LLVM suite.
    7777
    7878
    79 <h3>Requirements>
    79 <center>
    80

    Getting Started Quickly (A Summary)

    81
    82
    83
    84
    85 Here's the short story for getting up and running quickly with LLVM:
    86
    87
  • Install the GCC front end:
  • 88
    89
  • cd where-you-want-the-C-front-end-to-live
  • 90
  • gunzip --stdout cfrontend.platform.tar.gz | tar -xvf
  • 91 -
    92
    93
    94

    95
    96
  • Get the Source Code
  • 97
    98
  • With the distributed files:
  • 99
    100
  • cd where-you-want-llvm-to-live
  • 101
  • gunzip --stdout llvm.tar.gz | tar -xvf -
  • 102
  • cd llvm
  • 103
    104
    105

    106
    107
  • With anonymous CVS access:
  • 108
    109
  • Find the path to the CVS repository containing LLVM (we'll
  • 110 call this CVSROOTDIR).
    111
  • cd where-you-want-llvm-to-live
  • 112
  • cvs -d CVSROOTDIR checkout llvm
  • 113
  • cd llvm
  • 114
    115
    116
    117
    118

    119
    120
  • Configure the LLVM Build Environment
  • 121
    122
  • Change directory to where you want to store the LLVM object
  • 123 files and run configure to configure the Makefiles and
    124 header files for the default platform.
    125 Useful options include:
    126
    127
  • --with-llvmgccdir=directory
  • 128
    129 Specify where the LLVM GCC frontend is installed.
    130

    131
    132
  • --enable-spec2000=directory
  • 133
    134 Enable the SPEC2000 benchmarks for testing. The SPEC2000
    135 benchmarks should be available in directory.
    136
    137
    138
    139

    140
    141
  • Build the LLVM Suite
  • 142
    143
  • Set your LLVM_LIB_SEARCH_PATH environment variable.
  • 144
  • gmake -k |& tee gnumake.out
  • 145    # this is csh or tcsh syntax
    146
    147
    148

    149
    150
    151
    152

    153 Consult the Getting Started with LLVM section for
    154 detailed information on configuring and compiling LLVM. See
    155 Setting Up Your Environment for tips that
    156 simplify working with the GCC front end and LLVM tools. Go to
    157 Program Layout to learn about the layout of the
    158 source code tree.
    159
    160
    161
    162

    Requirements

    163
    164
    80165
    81166
    82167 Before you begin to use the LLVM system, review the requirements given
    84169 hardware and software you will need.
    85170
    86171
    87 4>Hardware>
    172 3>Hardware>
    88173
    89174 LLVM is known to work on the following platforms:
    90175
    111196
    112197
    113198
    114 LLVM may compile on other platforms. The LLVM utilities should work
    115 on other platforms, so it should be possible to generate and produce LLVM
    116 bytecode on unsupported platforms (although bytecode generated on one
    117 platform may not work on another platform). However, the code generators
    118 and Just-In-Time (JIT) compilers only generate SparcV9 or x86 machine code.
    119

    120
    121
    122

    Software

    123
    124

    125
    126 Unpacking the distribution requires the following tools:
    127
    128
    129 GNU Zip (gzip)
    130
    GNU Tar
    131
    132 These tools are needed to uncompress and unarchive the software.
    133 Regular Solaris tar may work for unpacking the TAR archive but
    134 is untested.
    135
    136
    137 Compiling LLVM requires that you have several different software packages
    138 installed:
    139
    140
    141
    GCC
    142
    143 The GNU Compiler Collection must be installed with C and C++ language
    144 support. GCC 3.2.x works, and GCC 3.x is generally supported.
    145
    146

    147 Note that we currently do not support any other C++ compiler.
    148

    149
    150
    GNU Make
    151
    152 The LLVM build system relies upon GNU Make extensions. Therefore, you
    153 will need GNU Make (sometimes known as gmake) to build LLVM.
    154

    155
    156
    Flex
    157 and
    158 Bison
    159
    160 The LLVM source code is built using flex and bison. You will not be
    161 able to configure and compile LLVM without them.
    162

    163
    164
    GNU M4
    165
    166 If you are installing Bison on your machine for the first time, you
    167 will need GNU M4 (version 1.4 or higher).
    168
    199 The LLVM suite may compile on other platforms, but it is not
    200 guaranteed to do so. If compilation is successful, the LLVM utilities
    201 should be able to assemble, disassemble, analyze, and optimize LLVM
    202 bytecode. Code generation should work as well, although the generated
    203 native code may not work on your platform.
    204

    205 The GCC front end is not very portable at the moment. If you want to get
    206 it to work on another platform, you can always request
    207 a copy of the source
    208 and try to compile it on your platform.
    209

    210
    211
    212

    Software

    213
    214

    215
    216 Compiling LLVM requires that you have several software packages installed:
    217
    218
    219
  • 220 GCC 3.x with C and C++ language support
    221
    222
  • 223 GNU Make
    224
    225
  • 226 Flex
    227
    228
  • 229 Bison
    230
    169231
    170232

    171233 There are some additional tools that you may want to have when working with
    177239
  • GNU M4
  • 178240

    179241 If you want to make changes to the configure scripts, you will need
    180 GNU autoconf (2.53 or higher), and consequently, GNU M4 (version 1.4
    242 GNU autoconf (2.57 or higher), and consequently, GNU M4 (version 1.4
    181243 or higher).
    182244

    183245
    184246
  • QMTest
  • 185247
  • Python
  • 186248

    187 In order to run the tests in the LLVM test suite, you will need QMTest and
    188 a version of the Python interpreter that works with QMTest.
    249 These are needed to use the LLVM test suite.
    189250
    190251
    191252
    192253

    The remainder of this guide is meant to get you up and running with

    193254 LLVM and to give you some basic information about the LLVM environment.
    194 The next section gives a short summary for those
    195 who are already familiar with the system and want to get started as quickly
    196 as possible. A complete guide to installation is
    197 provided in the subsequent section.
    255 A complete guide to installation is provided in the
    256 next section.
    198257
    199258

    The later sections of this guide describe the

    200 href="#layout">general layout of the the LLVM source-tree, a
    259 href="#layout">general layout of the the LLVM source tree, a
    201260 href="#tutorial">simple example using the LLVM tool chain, and
    202261 href="#links">links to find more information about LLVM or to get
    203262 help via e-mail.
    204
    205
    206
    207

    Getting Started Quickly (A Summary)

    208
    209
    210
    211
    212 Here's the short story for getting up and running quickly with LLVM:
    213
    214
  • Install the GCC front end:
  • 215
    216
  • cd where-you-want-the-C-front-end-to-live
  • 217
  • gunzip --stdout cfrontend.platform.tar.gz | tar -xvf
  • 218 -
    219
    220
    221

    222
    223
  • Get the Source Code
  • 224
    225
  • With the distributed files:
  • 226
    227
  • cd where-you-want-llvm-to-live
  • 228
  • gunzip --stdout llvm.tar.gz | tar -xvf -
  • 229
  • cd llvm
  • 230
    231
    232

    233
    234
  • With anonymous CVS access:
  • 235
    236
  • Find the path to the CVS repository containing LLVM (we'll
  • 237 call this CVSROOTDIR).
    238
  • cd where-you-want-llvm-to-live
  • 239
  • cvs -d CVSROOTDIR checkout llvm
  • 240
  • cd llvm
  • 241
    242
    243
    244
    245

    246
    247
  • Configure the LLVM Build Environment
  • 248
    249
  • Change directory to where you want to store the LLVM object
  • 250 files and run configure to configure the Makefiles and
    251 header files for the default platform.
    252 Useful options include:
    253
    254
  • --with-llvmgccdir=directory
  • 255
    256 Specify where the LLVM GCC frontend is installed.
    257

    258
    259
  • --enable-spec2000=directory
  • 260
    261 Enable the SPEC2000 benchmarks for testing. The SPEC2000
    262 benchmarks should be available in directory.
    263
    264
    265
    266

    267
    268
  • Build the LLVM Suite
  • 269
    270
  • Set your LLVM_LIB_SEARCH_PATH environment variable.
  • 271
  • gmake -k |& tee gnumake.out
  • 272    # this is csh or tcsh syntax
    273
    274
    275

    276
    277
    278
    279

    See Setting Up Your Environment on tips to

    280 simplify working with the LLVM front-end and compiled tools. See the
    281 next section for other useful details in working with LLVM,
    282 or go straight to Program Layout to learn about the
    283 layout of the source code tree.
    284263
    285264
    286265