X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FGettingStarted.rst;h=fa55ece44e7a27f92e63ca3f8e2edd545036b836;hb=71fa4016bbc6800689d2183e307ba6c8f6e1e689;hp=e49b775e9a5dd61adc63cfbd9c0fae07648aeb51;hpb=26476d32d3d399d79b7cc5fdd3051b5663dc37d5;p=oota-llvm.git diff --git a/docs/GettingStarted.rst b/docs/GettingStarted.rst index e49b775e9a5..fa55ece44e7 100644 --- a/docs/GettingStarted.rst +++ b/docs/GettingStarted.rst @@ -90,7 +90,7 @@ Here's the short story for getting up and running quickly with LLVM: * It is also possible to use `CMake `_ instead of the makefiles. With CMake it is possible to generate project files for several IDEs: Xcode, Eclipse CDT4, CodeBlocks, Qt-Creator (use the CodeBlocks - generator),KDevelop3. + generator), KDevelop3. * If you get an "internal compiler error (ICE)" or test failures, see `below`. @@ -115,7 +115,6 @@ LLVM is known to work on the following host platforms: ================== ===================== ============= OS Arch Compilers ================== ===================== ============= -AuroraUX x86\ :sup:`1` GCC Linux x86\ :sup:`1` GCC, Clang Linux amd64 GCC, Clang Linux ARM\ :sup:`4` GCC, Clang @@ -165,7 +164,7 @@ Package Version Notes =========================================================== ============ ========================================== `GNU Make `_ 3.79, 3.79.1 Makefile/build processor `GCC `_ >=4.7.0 C/C++ compiler\ :sup:`1` -`python `_ >=2.5 Automated test suite\ :sup:`2` +`python `_ >=2.7 Automated test suite\ :sup:`2` `GNU M4 `_ 1.4 Macro processor for configuration\ :sup:`3` `GNU Autoconf `_ 2.60 Configuration script builder\ :sup:`3` `GNU Automake `_ 1.9.6 aclocal macro generator\ :sup:`3` @@ -231,7 +230,7 @@ our build systems: * Clang 3.1 * GCC 4.7 -* Visual Studio 2012 +* Visual Studio 2013 Anything older than these toolchains *may* work, but will require forcing the build system with a special option and is not really a supported host platform. @@ -281,7 +280,7 @@ Getting a Modern Host C++ Toolchain This section mostly applies to Linux and older BSDs. On Mac OS X, you should have a sufficiently modern Xcode, or you will likely need to upgrade until you -do. On Windows, just use Visual Studio 2012 as the host compiler, it is +do. On Windows, just use Visual Studio 2013 as the host compiler, it is explicitly supported and widely available. FreeBSD 10.0 and newer have a modern Clang as the system compiler. @@ -331,10 +330,23 @@ of this information from. .. _GCC wiki entry: http://gcc.gnu.org/wiki/InstallingGCC -Once you have a GCC toolchain, use it as your host compiler. Things should -generally "just work". You may need to pass a special linker flag, -``-Wl,-rpath,$HOME/toolchains/lib`` or some variant thereof to get things to -find the libstdc++ DSO in this toolchain. +Once you have a GCC toolchain, configure your build of LLVM to use the new +toolchain for your host compiler and C++ standard library. Because the new +version of libstdc++ is not on the system library search path, you need to pass +extra linker flags so that it can be found at link time (``-L``) and at runtime +(``-rpath``). If you are using CMake, this invocation should produce working +binaries: + +.. code-block:: console + + % mkdir build + % cd build + % CC=$HOME/toolchains/bin/gcc CXX=$HOME/toolchains/bin/g++ \ + cmake .. -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,$HOME/toolchains/lib64 -L$HOME/toolchains/lib64" + +If you fail to set rpath, most LLVM binaries will fail on startup with a message +from the loader similar to ``libstdc++.so.6: version `GLIBCXX_3.4.20' not +found``. This means you need to tweak the -rpath linker flag. When you build Clang, you will need to give *it* access to modern C++11 standard library in order to use it as your new host in part of a bootstrap. @@ -681,7 +693,7 @@ The following options can be used to set or enable LLVM specific options: Enables optimized compilation (debugging symbols are removed and GCC optimization flags are enabled). Note that this is the default setting if you - are using the LLVM distribution. The default behavior of an Subversion + are using the LLVM distribution. The default behavior of a Subversion checkout is to use an unoptimized build (also known as a debug build). ``--enable-debug-runtime`` @@ -713,13 +725,6 @@ The following options can be used to set or enable LLVM specific options: generating the documentation can take a long time and producess 100s of megabytes of output. -``--with-udis86`` - - LLVM can use external disassembler library for various purposes (now it's used - only for examining code produced by JIT). This option will enable usage of - `udis86 `_ x86 (both 32 and 64 bits) - disassembler library. - To configure LLVM, follow these steps: #. Change directory into the object root directory: @@ -1013,7 +1018,7 @@ This directory contains most of the source files of the LLVM system. In LLVM, almost all code exists in libraries, making it very easy to share code among the different `tools`_. -``llvm/lib/VMCore/`` +``llvm/lib/IR/`` This directory holds the core LLVM source files that implement core classes like Instruction and BasicBlock.