llvm.org GIT mirror llvm / ce760f6
Performed a major update for the pre-release. Attempted to better structure and order the document. Added more information about autoconf, the build system, and how to build LLVM. Added directions on how to build the C front end. Added a section on common problems and their solutions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7096 91177308-0d34-0410-b5e6-96231b3b80d8 John Criswell 16 years ago
1 changed file(s) with 475 addition(s) and 171 deletion(s). Raw diff Collapse all Expand all
1717
1818
1919
  • Overview
  • 20
  • Getting started with LLVM
  • 21
    20
    2221
  • Requirements
  • 2322
    2423
  • Hardware
  • 2524
  • Software
  • 2625
    26
    27
  • Getting started with LLVM
  • 28
    2729
  • Getting started quickly (a summary)
  • 30
  • Terminology and Notation
  • 31
  • Setting up your environment
  • 2832
  • Checkout LLVM from CVS
  • 29
  • Terminology and Notation
  • 33
  • Local LLVM Configuration
  • 34
  • Compiling the LLVM Suite Source Code
  • 35
  • Building the LLVM C Front End
  • 3036
  • The location for object files
  • 31
  • Local Configuration Options
  • 32
  • Setting up your environment
  • 33
  • Compiling the source code
  • 3437
    3538
  • Program layout
  • 3639
    3740
  • CVS directories
  • 38
  • Depend, Debug, &
  • 39 Release directories
    4041
  • llvm/include
  • 4142
  • llvm/lib
  • 4243
  • llvm/test
  • 5354
    5455
    5556
    56

    The next section of this guide is meant to get

    57 you up and running with LLVM and to give you some basic information about
    58 the LLVM environment. The first subsection gives
    59 a short summary for those who are already familiar with the system and
    60 want to get started as quickly as possible.
    61
    62

    The later sections of this guide describe the

    63 href="#layout">general layout of the the LLVM source-tree, a
    64 href="#tutorial">simple example using the LLVM tool chain, and
    65 href="#links">links to find more information about LLVM or to get
    66 help via e-mail.
    67
    68
    69
    70

    Getting Started

    71
    72
    57 Welcome to LLVM! In order to get started, you first need to know some
    58 basic information.
    59
    60

    61 First, LLVM comes in two pieces. The first piece is the LLVM suite. This
    62 contains all of the tools, libraries, and header files needed to use the
    63 low level virtual machine. It also contains a test suite that can be used
    64 to test the LLVM tools and the GCC front end.
    65

    66 The second piece is the GCC front end. This component provides a version
    67 of GCC that compiles C code into LLVM bytecode. Currently, the C front end
    68 is a modified version of GCC 3.4 (we track the GCC 3.4 development).
    69 Once compiled into LLVM bytecode, a program can be manipulated with the
    70 LLVM tools.
    7371
    7472
    7573

    Requirements

    7674
    75
    76 Before you begin to use the LLVM system, review the requirements given
    77 below. This may save you some trouble by knowing ahead of time what
    78 hardware and software you will need.
    7779
    7880
    7981

    Hardware

    8890
  • Object code: 670 MB
  • 8991
    9092
    91
  • Solaris on Sparc
  • 93
  • Solaris on SparcV9 (Ultrasparc)
  • 9294
    9395
  • Approximately 1.03 GB of Free Disk Space
  • 9496
    98100
    99101
    100102
    101 LLVM may compile on other platforms. While the LLVM utilities should work,
    102 they will only generate Sparc or x86 machine code.
    103 LLVM may compile on other platforms. The LLVM utilities should work
    104 on other platforms, so it should be possible to generate and produce LLVM
    105 bytecode on unsupported platforms (although bytecode generated on one
    106 platform may not work on another platform). However, the code generators
    107 and Just In Time Compilers (JIT's) only generate SparcV9 or x86 machine
    108 code.
    103109
    104110
    105111

    Software

    108114 Compiling LLVM requires that you have several different software packages
    109115 installed:
    110116
    111
    112
  • GCC
  • 113 >
    117
    >
    118
    GCC
    119
    114120 The GNU Compiler Collection must be installed with C and C++ language
    115 support. GCC 3.x is supported, although some effort has been made to
    116 support GCC 2.96.
    117

    121 support. GCC 3.2.x works, and GCC 3.x is generally supported.
    118122
    119123

    120124 Note that we currently do not support any other C++ compiler.
    121125

    122126
    123
  • GNU Make
  • 124 <p>
    127 <dt> GNU Make
    128
    125129 The LLVM build system relies upon GNU Make extensions. Therefore, you
    126130 will need GNU Make (sometimes known as gmake) to build LLVM.
    127

    128
    129
  • Flex and Bison
  • 130

    131

    132
    133
    Flex and Bison
    134
    131135 The LLVM source code is built using flex and bison. You will not be
    132136 able to configure and compile LLVM without them.
    133

    134 >
    137 >
    138
    139
    GNU M4
    140
    141 If you are installing Bison on your machine for the first time, you
    142 will need GNU M4 (version 1.4 or higher).
    143
    135144
    136145

    137146 There are some additional tools that you may want to have when working with
    139148

    140149
    141150
    142
  • GNU Autoconf and GNU M4
  • 143

    144 If you want to make changes to the autoconf scripts which configure LLVM
    145 for compilation, you will need GNU autoconf, and consequently, GNU M4.
    146 LLVM was built with autoconf 2.53, so that release and any later
    147 release should work.
    151
  • GNU Autoconf
  • 152
  • GNU M4
  • 153

    154 If you want to make changes to the configure scripts, you will need
    155 GNU autoconf (2.53 or higher), and consequently, GNU M4 (version 1.4
    156 or higher).
    148157

    149158
    150159
    160
    161

    The next section of this guide is meant to get

    162 you up and running with LLVM and to give you some basic information about
    163 the LLVM environment. The first subsection gives
    164 a short summary for those who are already familiar with the system and
    165 want to get started as quickly as possible.
    166
    167

    The later sections of this guide describe the

    168 href="#layout">general layout of the the LLVM source-tree, a
    169 href="#tutorial">simple example using the LLVM tool chain, and
    170 href="#links">links to find more information about LLVM or to get
    171 help via e-mail.
    172
    173
    174
    175

    Getting Started

    176
    177
    178
    151179
    152180

    Getting Started Quickly (A Summary)

    153181
    154182
    155183 Here's the short story for getting up and running quickly with LLVM:
    156184
    157
  • Find the path to the CVS repository containing LLVM (we'll call this CVSROOTDIR).
  • 158
  • cd where-you-want-llvm-to-live
  • 159
  • cvs -d CVSROOTDIR checkout llvm
  • 160
  • cd llvm
  • 161
  • Run configure to configure the Makefiles and header files.
  • 162 Useful options include:
    163
    164
  • --with-objroot=directory
  • 165
    166 Specifiy where object files should be placed during the build.
    167
    168
  • --with-llvmgccdir=directory
  • 169
    170 Specifiy where the LLVM C frontend has been installed.
    171
    172
  • Set your LLVM_LIB_SEARCH_PATH environment variable.
  • 173
  • gmake -k |& tee gnumake.out
  • 174    # this is csh or tcsh syntax
    185
  • Build the LLVM suite
  • 186
    187
  • Find the path to the CVS repository containing LLVM (we'll call this CVSROOTDIR).
  • 188
  • cd where-you-want-llvm-to-live
  • 189
  • cvs -d CVSROOTDIR checkout llvm
  • 190
  • cd llvm
  • 191
  • Run configure to configure the Makefiles and header files.
  • 192 Useful options include:
    193
    194
  • --with-objroot=directory
  • 195
    196 Specify where object files should be placed during the build.
    197
    198
  • --with-llvmgccdir=directory
  • 199
    200 Specify where the LLVM C frontend is going to be installed.
    201
    202
  • Set your LLVM_LIB_SEARCH_PATH environment variable.
  • 203
  • gmake -k |& tee gnumake.out
  • 204    # this is csh or tcsh syntax
    205
    206

    207
  • Build the LLVM C Front End
  • 208
    209
  • Create a directory for the object files to live.
  • 210
  • cd object file directory
  • 211
  • Run Pathname-to-where-the-source-code-lives/configure --prefix=LLVMGCCDIR to configure GCC.
  • 212
  • make bootstrap
  • 213
  • make install
  • 214
    175215
    176216
    177217

    See Setting up your environment on tips to

    190230 of this document below. In any of the examples below, simply replace
    191231 each of these names with the appropriate pathname on your local system.
    192232 All these paths are absolute:

    193
    194 </ul>
    233 <dl compact>
    234
    CVSROOTDIR
    235
    236 This is the path for the CVS repository containing the LLVM source
    237 code. Ask the person responsible for your local LLVM installation to
    238 give you this path.
    239

    240
    241
    OBJ_ROOT
    242
    243 This is the top level directory for where the LLVM suite object files
    244 will be placed during the build.
    245

    246
    247
    LLVMGCCDIR
    248
    249 This is the pathname to the location where the LLVM C Front End will
    250 be installed. Note that the C front end does not need to be installed
    251 during the LLVM suite build; you will just need to know where it will
    252 go for configuring the build system and running the test suite later.
    253

    254
    255
    GCCSRC
    256
    257 This is the pathname of the directory where the LLVM C front end source
    258 code can be found.
    259

    260
    261
    GCCOBJ
    262
    263 This is the pathname of the directory where the LLVM C front end object
    264 code will be placed during the build. It can be safely removed once
    265 the build is complete.
    266
    267
    268
    269

    Setting up your environment

    270
    271
    272

    273 In order to compile and use LLVM, you will need to set some environment
    274 variables. There are also some shell aliases which you may find useful.
    275 You can set these on the command line, or better yet, set them in your
    276 .cshrc or .profile.
    277
    278
    279
    LLVM_LIB_SEARCH_PATH=LLVMGCCDIR/llvm-gcc/bytecode-libs
    280
    281 This environment variable helps the LLVM C front end find bytecode
    282 libraries that it will need for compilation.
    283

    284
    285
    PATH=${PATH}:OBJ_ROOT/llvm/tools/Debug
    286
    287 Adding this directory to the end of your path will allow the
    288 compilation of the C front end to find the LLVM tools. The LLVM tools
    289 are needed for the C front end compile.
    290

    291
    292
    CC=Pathname to your GCC compiler
    293
    294 The GCC compiler that you want to use must be the first C compiler in
    295 your PATH. Otherwise, set this variable so that
    296 configure will use the GCC compiler that you want to use.
    297

    298
    299
    CXX=Pathname to your GCC C++ compiler
    300
    301 The GCC compiler that you want to use must be the first C++ compiler in
    302 your PATH. Otherwise, set this variable so that
    303 configure will use the GCC compiler that you want to use.
    304

    305
    306
    CVSROOT=CVSROOT
    307
    308 This environment variable tells CVS where to find the CVS repository.
    309

    310
    311
    alias llvmgcc LLVMGCCDIR/bin/llvm-gcc
    312
    313 This alias allows you to use the LLVM C front end without putting it in
    314 your PATH or typing in its complete pathname.
    315
    195316
    196317
    197318

    Checkout LLVM from CVS

    198319
    199
    200

    Before checking out the source code, you will need to know the path to

    201 the CVS repository containing the LLVM source code (we'll call this
    202 CVSROOTDIR below). Ask the person responsible for your local LLVM
    203 installation to give you this path.
    204320
    205321

    To get a fresh copy of the entire source code, all you

    206322 need to do is check it out from CVS as follows:
    213329 directory and fully populate it with the LLVM source code, Makefiles,
    214330 test directories, and local copies of documentation files.

    215331
    216
    217

    Local Configuration Options

    218
    219
    220

    Once checked out from the CVS repository, options and pathnames specific

    221 to an installation of LLVM can be set via the configure script.
    222 This script sets variables in llvm/Makefile.config and
    332

    333 Note that the C front end is not included in the CVS repository. You
    334 should have either downloaded the source, or better yet, downloaded the
    335 binary distribution for your platform.
    336

    337
    338
    339

    Local LLVM Configuration

    340
    341
    342

    Once checked out from the CVS repository, the LLVM suite source code

    343 must be configured via the configure script. This script sets
    344 variables in llvm/Makefile.config and
    223345 llvm/include/Config/config.h.
    224346
    225347

    228350

    229351
    230352
    231

  • CXX = Pathname of the C++ compiler to use.
  • 232

  • CC = Pathname of the C compiler to use.
  • 353

  • CXX = Pathname of the C++ compiler to use.
  • 354

  • CC = Pathname of the C compiler to use.
  • 233355
    234356
    235357 The following options can be used to set or enable LLVM specific options:
    236358
    237
    238 <p>
  • --with-objroot=LLVM_OBJ_ROOT =
  • 359 <dl compact>
    360
    --with-objroot=OBJ_ROOT
    361
    239362 Path to the directory where
    240363 object files, libraries, and executables should be placed.
    364 If this is set to ., then the object files will be placed
    365 within the source code tree. If left unspecified, the default value is
    366 ..
    241367 (See the Section on
    242368 The location for LLVM object files
    243369 for more information.)
    244

  • --with-llvmgccdir=LLVMGCCDIR =
  • 245 Path to the location of the LLVM front-end
    246 binaries and associated libraries.
    247

  • --enable-optimized =
  • 370

    371
    --with-llvmgccdir=LLVMGCCDIR
    372
    373 Path to the location where the LLVM C front end binaries and
    374 associated libraries will be installed.
    375

    376
    --enable-optimized
    377
    248378 Enables optimized compilation (debugging symbols are removed and GCC
    249 optimization flags are enabled).
    250

  • --enable-jit =
  • 379 optimization flags are enabled). The default is to use an unoptimized
    380 build (also known as a debug build).
    381

    382
    --enable-jit
    383
    251384 Compile the Just In Time (JIT) functionality. This is not available
    252 on all platforms.
    253
    385 on all platforms. The default is dependent on platform, so it is best
    386 to explicitly enable it if you want it.
    387
    254388
    255389 In addition to running configure, you must set the
    256390 LLVM_LIB_SEARCH_PATH environment variable in your startup scripts.
    257391 This environment variable is used to locate "system" libraries like
    258392 "-lc" and "-lm" when linking. This variable should be set
    259393 to the absolute path for the bytecode-libs subdirectory of the C front-end
    260 install. For example, one might set LLVM_LIB_SEARCH_PATH to
    394 install, or LLVMGCCDIR/llvm-gcc/bytecode-libs. For example, one might
    395 set LLVM_LIB_SEARCH_PATH to
    261396 /home/vadve/lattner/local/x86/llvm-gcc/bytecode-libs for the X86
    262397 version of the C front-end on our research machines.

    263398
    264399
    400

    Compiling the LLVM Suite Source Code

    401
    402
    403 Once you have configured LLVM, you can build it. There are three types of
    404 builds:
    405
    406
    407
    Debug Builds
    408
    409 These builds are the default. They compile the tools and libraries
    410 with debugging information.
    411

    412
    413
    Release (Optimized) Builds
    414
    415 These builds are enabled with the --enable-optimized option to
    416 configure. They compile the tools and libraries with GCC
    417 optimizer flags on and strip debugging information from the libraries
    418 and executables it generates.
    419

    420
    421
    Profile Builds
    422
    423 These builds are for use with profiling. They compile profiling
    424 information into the code for use with programs like gprof.
    425 Profile builds must be started by setting variables on the
    426 make command line.
    427
    428
    429 Once you have LLVM configured, you can build it by entering the top level
    430 llvm directory and issuing the following command:
    431

    432 make
    433
    434

    435 If you have multiple processors in your machine, you may wish to use some
    436 of the parallel build options provided by GNU Make. For example, you could
    437 use the command:
    438

    439
    440

    441 make -j2
    442
    443

    444 There are several other targets which are useful when working with the LLVM
    445 source code:
    446
    447
    448
    make clean
    449
    450 Removes all files generated by the build. This includes object files,
    451 generated C/C++ files, libraries, and executables.
    452

    453
    454
    make distclean
    455
    456 Removes everything that make clean does, but also removes
    457 files generated by configure. It attempts to return the
    458 source tree to the original state in which it was shipped.
    459

    460
    461
    462 It is also possible to override default values from configure by
    463 declaring variables on the command line. The following are some examples:
    464
    465
    466
    make ENABLE_OPTIMIZED=1
    467
    468 Perform a Release (Optimized) build.
    469

    470
    471
    make ENABLE_PROFILING=1
    472
    473 Perform a Profiling build.
    474

    475
    476
    make VERBOSE=1
    477
    478 Print what make is doing on standard output.
    479

    480
    481
    482 Every directory in the LLVM source tree includes a Makefile to
    483 build it and any subdirectories that it contains. Entering any directory
    484 inside the LLVM source tree and typing make should rebuild
    485 anything in or below that directory that is out of date.
    486
    487
    488

    Building the LLVM C Front End

    489
    490
    491
    492

    493 This step is optional if you have the C front end binary distrubtion for
    494 your platform.
    495

    496
    497
    498 Now that you have the LLVM Suite built, you can build the C front end. For
    499 those of you that have built GCC before, the process is very similar.
    500

    501 Be forewarned, though: the build system for the C front end is not as
    502 polished as the rest of the LLVM code, so there will be many warnings and
    503 errors that you will need to ignore for now:
    504
    505
    506
  • Ensure that OBJ_ROOT/llvm/tools/Debug is at the
  • 507 end of your PATH environment variable.
    508
    509
  • cd GCCOBJ
  • 510
    511
  • Configure the source code:
  • 512
    513
  • On Linux/x86, use
  • 514
    515
  • GCCSRC/configure --prefix=LLVMGCCDIR
  • 516 --enable-languages=c
    517
    518
    519
  • On Solaris/Sparc, use
  • 520
    521
  • GCCSRC/configure --prefix=LLVMGCCDIR
  • 522 --enable-languages=c --target=sparcv9-sun-solaris2
    523
    524
    525
    526
  • make bootstrap
  • 527
    528
  • The build will eventually fail. Don't worry; chances are good that
  • 529 everything that needed to build is built.
    530
    531
  • make install
  • 532
    533
    534 At this point, you should have a working copy of the LLVM C front end
    535 installed in LLVMGCCDIR.
    536
    537
    265538

    The location for LLVM object files

    266539
    267540
    268

    The LLVM make system sends most output files generated during the build

    269 into the directory defined by the variable OBJ_ROOT in
    270 <tt>llvm/Makefile.config. This can be either just your normal LLVM
    541 <p>The LLVM build system sends most output files generated during the build
    542 into the directory defined by the variable OBJ_ROOT in
    543 llvm/Makefile.config, which is set by the --with-objroot
    544 option in configure. This can be either just your normal LLVM
    271545 source tree or some other directory writable by you. You may wish to put
    272546 object files on a different filesystem either to keep them from being backed
    273547 up or to speed up local builds.
    274548
    275

    If you wish to place output files into a separate directory, use the

    276 --with-objroot=directory option of configure to
    277 set the top level directory of where the object files will go. Otherwise,
    278 leave this option unspecified, and configure will place files
    279 within the LLVM source tree.
    280
    281
    282

    Setting up your environment

    283
    284
    285 NOTE: This step is optional but will set up your environment so you
    286 can use the compiled LLVM tools with as little hassle as
    287 possible.)
    288
    289

    Add the following lines to your .cshrc (or the corresponding

    290 lines to your .profile if you use a bourne shell derivative).
    291
    292
    
                      
                    
    293 # Make the C front end easy to use...
    294 alias llvmgcc LLVMGCCDIR/bin/llvm-gcc
    295
    296 # Make the LLVM tools easy to use...
    297 setenv PATH OBJ_ROOT/llvm/tools/Debug:${PATH}
    298
    299 The llvmgcc alias is useful because the C compiler is not
    300 included in the CVS tree you just checked out.
    301
    302

    The other LLVM tools are part of the LLVM

    303 source base and built when compiling LLVM. They will be built into the
    304 OBJ_ROOT/tools/Debug directory.

    305
    306
    307

    Compiling the source code

    308
    309
    310

    Every directory in the LLVM source tree includes a Makefile to

    311 build it and any subdirectories that it contains. These makefiles require
    312 that you use GNU Make (sometimes called gmake) instead of
    313 make to
    314 build them, but can
    315 otherwise be used freely. To build the entire LLVM system, just enter the
    316 top level llvm directory and type gmake. A few minutes
    317 later you will hopefully have a freshly compiled toolchain waiting for you
    318 in OBJ_ROOT/llvm/tools/Debug. If you want to look at the
    319 libraries that
    320 were compiled, look in OBJ_ROOT/llvm/lib/Debug.

    321
    322 If you get an error about a /localhome directory, follow the
    323 instructions in the section about Setting Up Your
    324 Environment.
    325
    326
    549

    550 If OBJ_ROOT is specified, then the build system will create a
    551 directory tree underneath it that resembles the source code's pathname
    552 relative to your home directory.
    553

    554
    555

    556 For example, suppose that OBJ_ROOT is set to /tmp and the
    557 LLVM suite source code is located in /usr/home/joe/src/llvm, where
    558 /usr/home/joe is the home directory of a user named Joe. Then,
    559 the object files will be placed in /tmp/src/llvm.
    560

    561
    562

    563 The LLVM build will place files underneath OBJ_ROOT in directories
    564 named after the build type:
    565

    566
    567
    568
    Debug Builds
    569
    570
    571
    Tools
    572
    OBJ_ROOT/llvm/tools/Debug
    573
    Libraries
    574
    OBJ_ROOT/llvm/lib/Debug
    575
    576

    577
    578
    Release Builds
    579
    580
    581
    Tools
    582
    OBJ_ROOT/llvm/tools/Release
    583
    Libraries
    584
    OBJ_ROOT/llvm/lib/Release
    585
    586

    587
    588
    Profile Builds
    589
    590
    591
    Tools
    592
    OBJ_ROOT/llvm/tools/Profile
    593
    Libraries
    594
    OBJ_ROOT/llvm/lib/Profile
    595
    596
    327597
    328598
    329599
    331601
    332602
    333603
    334

    One useful source of infomation about the LLVM sourcebase is the LLVM

    604

    One useful source of information about the LLVM source base is the LLVM

    335605 href="http://www.doxygen.org">doxygen documentation, available at
    336606 href="http://llvm.cs.uiuc.edu/doxygen/">http://llvm.cs.uiuc.edu/doxygen/. The
    337607 following is a brief introduction to code layout:

    343613
    344614 Every directory checked out of CVS will contain a CVS directory;
    345615 for the most part these can just be ignored.
    346
    347
    348
    349

    Depend, Debug, & Release

    350 directories
    351
    352
    353 If you are building with the "OBJ_ROOT=." option enabled in the
    354 Makefile.config file (i.e. you did not specify
    355 --with-objroot when you ran configure), most source
    356 directories will contain two
    357 directories, Depend and Debug. The Depend
    358 directory contains automatically generated dependance files which are used
    359 during compilation to make sure that source files get rebuilt if a header
    360 file they use is modified. The Debug directory holds the object
    361 files, library files, and executables that are used for building a debug
    362 enabled build. The Release directory is created to hold the same
    363 files when the ENABLE_OPTIMIZED=1 flag is passed to gmake,
    364 causing an optimized build to be performed.

    365616
    366617
    367618
    378629 Reoptimizer, Target, Transforms, etc...
    379630
    380631
  • llvm/include/Support - This directory contains generic
  • 381 support libraries that are independant of LLVM, but are used by LLVM.
    632 support libraries that are independent of LLVM, but are used by LLVM.
    382633 For example, some C++ STL utilities and a Command Line option processing
    383634 library.
    384635
    465716
    466717
    lli
    lli is the LLVM interpreter, which
    467718 can directly execute LLVM bytecode (although very slowly...). In addition
    468 to a simple intepreter, lli is also has debugger and tracing
    719 to a simple interpreter, lli is also has debugger and tracing
    469720 modes (entered by specifying -debug or -trace on the
    470721 command line, respectively).

    471722
    490741 disassembled or manipulated just like any other bytecode file). The
    491742 command line interface to gccas is designed to be as close as
    492743 possible to the system 'as' utility so that the gcc
    493 frontend itself did not have to be modified to interface to a "wierd"
    744 frontend itself did not have to be modified to interface to a "weird"
    494745 assembler.

    495746
    496747
    gccld
    gccld links together several LLVM
    570821
    571822
    572823
    824

    Common Problems

    825
    826
    827 Below are common problems and their remedies:
    828
    829
    830
    When I run configure, it finds the wrong C compiler.
    831
    832 The configure script attempts to locate first gcc and
    833 then cc, unless it finds compiler paths set in CC and
    834 CXX for the C and C++ compiler, respectively.
    835
    836 If configure finds the wrong compiler, either adjust your
    837 PATH environment variable or set CC and CXX
    838 explicitly.
    839

    840
    841
    I compile the code, and I get some error about /localhome.
    842
    843 There are several possible causes for this. The first is that you
    844 didn't set a pathname properly when using configure, and it
    845 defaulted to a pathname that we use on our research machines.
    846

    847 Another possibility is that we hardcoded a path in our Makefiles. If
    848 you see this, please email the LLVM bug mailing list with the name of
    849 the offending Makefile and a description of what is wrong with it.
    850
    851
    The configure script finds the right C compiler, but it
    852 uses the LLVM linker from a previous build. What do I do?
    853
    854 The configure script uses the PATH to find
    855 executables, so if it's grabbing the wrong linker/assembler/etc, there
    856 are two ways to fix it:
    857
    858
  • Adjust your PATH environment variable so that the
  • 859 correct program appears first in the PATH. This may work,
    860 but may not be convenient when you want them first in your
    861 path for other work.
    862

    863
    864
  • Run configure with an alternative PATH that
  • 865 is correct. In a Borne compatible shell, the syntax would be:
    866

    867 PATH= ./configure ...
    868

    869 This is still somewhat inconvenient, but it allows
    870 configure to do its work without having to adjust your
    871 PATH permanently.
    872
    873
    874
    875
    573876

    Links

    574877
    575878
    582885
    583886
  • LLVM homepage
  • 584887
  • LLVM doxygen tree
  • 888
  • Starting a Project that Uses LLVM
  • 585889
    586890
    587891