Lines Matching +full:macos +full:- +full:llvm +full:- +full:gcc +full:- +full:4
2 Getting Started with the LLVM System
11 Welcome to LLVM! In order to get started, you first need to know some basic
14 First, LLVM comes in three pieces. The first piece is the LLVM suite. This
15 contains all of the tools, libraries, and header files needed to use LLVM. It
17 also contains basic regression tests that can be used to test the LLVM tools and
20 The second piece is the `Clang <http://clang.llvm.org/>`_ front end. This
21 component compiles C, C++, Objective C, and Objective C++ code into LLVM
22 bitcode. Once compiled into LLVM bitcode, a program can be manipulated with the
23 LLVM tools from the LLVM suite.
26 with a testing harness that can be used to further test LLVM's functionality
32 The LLVM Getting Started documentation may be out of date. So, the `Clang
33 Getting Started <http://clang.llvm.org/get_started.html>`_ page might also be a
36 Here's the short story for getting up and running quickly with LLVM:
44 #. Checkout LLVM:
46 * ``cd where-you-want-llvm-to-live``
47 * ``svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm``
51 * ``cd where-you-want-llvm-to-live``
52 * ``cd llvm/tools``
53 * ``svn co http://llvm.org/svn/llvm-project/cfe/trunk clang``
55 #. Checkout Compiler-RT (required to build the sanitizers) **[Optional]**:
57 * ``cd where-you-want-llvm-to-live``
58 * ``cd llvm/projects``
59 * ``svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt``
63 * ``cd where-you-want-llvm-to-live``
64 * ``cd llvm/projects``
65 * ``svn co http://llvm.org/svn/llvm-project/openmp/trunk openmp``
69 * ``cd where-you-want-llvm-to-live``
70 * ``cd llvm/projects``
71 * ``svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx``
72 * ``svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi``
76 * ``cd where-you-want-llvm-to-live``
77 * ``cd llvm/projects``
78 * ``svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite``
80 #. Configure and build LLVM and Clang:
86 The build uses `CMake <CMake.html>`_. LLVM requires CMake 3.4.3 to build. It
92 * ``cd where you want to build llvm``
95 * ``cmake -G <generator> [options] <path to llvm sources>``
99 * ``Unix Makefiles`` --- for generating make-compatible parallel makefiles.
100 * ``Ninja`` --- for generating `Ninja <https://ninja-build.org>`_
101 build files. Most llvm developers use Ninja.
102 * ``Visual Studio`` --- for generating Visual Studio projects and
104 * ``Xcode`` --- for generating Xcode projects.
108 * ``-DCMAKE_INSTALL_PREFIX=directory`` --- Specify for *directory* the full
109 pathname of where you want the LLVM tools and libraries to be installed
112 * ``-DCMAKE_BUILD_TYPE=type`` --- Valid options for *type* are Debug,
115 * ``-DLLVM_ENABLE_ASSERTIONS=On`` --- Compile with assertion checks enabled
120 * The default target (i.e. ``make``) will build all of LLVM
122 * The ``check-all`` target (i.e. ``make check-all``) will run the
126 LLVM sub-projects generate their own ``check-<project>`` target.
129 parallel build; for ``make``, use ``make -j``.
136 Consult the `Getting Started with LLVM`_ section for detailed information on
137 configuring and compiling LLVM. Go to `Directory Layout`_ to learn about the
143 Before you begin to use the LLVM system, review the requirements given below.
148 --------
150 LLVM is known to work on the following host platforms:
155 Linux x86\ :sup:`1` GCC, Clang
156 Linux amd64 GCC, Clang
157 Linux ARM\ :sup:`4` GCC, Clang
158 Linux PowerPC GCC, Clang
159 Solaris V9 (Ultrasparc) GCC
160 FreeBSD x86\ :sup:`1` GCC, Clang
161 FreeBSD amd64 GCC, Clang
162 MacOS X\ :sup:`2` PowerPC GCC
163 MacOS X x86 GCC, Clang
164 Cygwin/Win32 x86\ :sup:`1, 3` GCC
166 Windows x64 x86-64 Visual Studio
172 #. Code generation supported for 32-bit ABI only
173 #. To use LLVM modules on Win32-based system, you may configure LLVM
174 with ``-DBUILD_SHARED_LIBS=On``.
175 #. MCJIT not working well pre-v7, old JIT engine not supported any more.
177 Note that Debug builds require a lot of time and disk space. An LLVM-only build
178 will need about 1-3 GB of space. A full build of LLVM and Clang will need around
179 15-20 GB of disk space. The exact space requirements will vary by system. (It
183 If you you are space-constrained, you can build only selected tools or only
186 The LLVM suite *may* compile on other platforms, but it is not guaranteed to do
187 so. If compilation is successful, the LLVM utilities should be able to
188 assemble, disassemble, analyze, and optimize LLVM bitcode. Code generation
193 --------
195 Compiling LLVM requires that you have several software packages installed. The
197 for the software package that LLVM depends on. The Version column provides
198 "known to work" versions of the package. The Notes column describes how LLVM
205 `GCC <http://gcc.gnu.org/>`_ >=4.7.0 C/C++ compiler\ :sup:`1`
213 other languages for LLVM's purposes. See `below` for specific version
216 ``llvm/test`` directory.
217 #. Optional, adds compression / uncompression capabilities to selected LLVM
223 * **ar** --- archive library builder
224 * **bzip2** --- bzip2 command for distribution generation
225 * **bunzip2** --- bunzip2 command for distribution checking
226 * **chmod** --- change permissions on a file
227 * **cat** --- output concatenation utility
228 * **cp** --- copy files
229 * **date** --- print the current date/time
230 * **echo** --- print to standard output
231 * **egrep** --- extended regular expression search utility
232 * **find** --- find files/dirs in a file system
233 * **grep** --- regular expression search utility
234 * **gzip** --- gzip command for distribution generation
235 * **gunzip** --- gunzip command for distribution checking
236 * **install** --- install directories/files
237 * **mkdir** --- create a directory
238 * **mv** --- move (rename) files
239 * **ranlib** --- symbol table builder for archive libraries
240 * **rm** --- remove (delete) files and directories
241 * **sed** --- stream editor for transforming output
242 * **sh** --- Bourne shell for make build scripts
243 * **tar** --- tape archive for distribution generation
244 * **test** --- test things in file system
245 * **unzip** --- unzip command for distribution checking
246 * **zip** --- zip command for distribution generation
252 ------------------------------------------------------
254 LLVM is very demanding of the host C++ compiler, and as such tends to expose
258 order to build LLVM.
264 * GCC 4.7
270 miscompiled LLVM.
273 recent version may be required to support all of the C++ features used in LLVM.
278 **GCC 4.6.3 on ARM**: Miscompiles ``llvm-readobj`` at ``-O3``. A test failure
279 in ``test/Object/readobj-shared-object.test`` is one symptom of the problem.
288 times (minutes instead of seconds) when building LLVM. We recommend upgrading
289 to a newer version (2.17.50.0.4 or later).
293 intermittent failures when building LLVM with position independent code. The
300 recommend using the system GCC to compile LLVM and Clang in this case.
306 contained `a bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53841>`__ which
320 extremely old versions of GCC. These steps attempt to help you upgrade you
326 a consequence, this guide suggests just using libstdc++ and a modern GCC as the
329 The first step is to get a recent GCC toolchain installed. The most common
332 the `toolchain testing PPA`_ and use it to install a modern GCC. There is
336 after all) to build and install GCC from source. It is also quite easy to do
340 https://launchpad.net/~ubuntu-toolchain-r/+archive/test
342 http://askubuntu.com/questions/271388/how-to-install-gcc-4-8-in-ubuntu-12-04-from-the-terminal
344 Easy steps for installing GCC 4.8.2:
346 .. code-block:: console
348 % wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2
349 % wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2.sig
350 % wget https://ftp.gnu.org/gnu/gnu-keyring.gpg
351 …% signature_invalid=`gpg --verify --no-default-keyring --keyring ./gnu-keyring.gpg gcc-4.8.2.tar.b…
353 % tar -xvjf gcc-4.8.2.tar.bz2
354 % cd gcc-4.8.2
357 % mkdir gcc-4.8.2-build
358 % cd gcc-4.8.2-build
359 % $PWD/../gcc-4.8.2/configure --prefix=$HOME/toolchains --enable-languages=c,c++
360 % make -j$(nproc)
363 For more details, check out the excellent `GCC wiki entry`_, where I got most
367 http://gcc.gnu.org/wiki/InstallingGCC
369 Once you have a GCC toolchain, configure your build of LLVM to use the new
372 extra linker flags so that it can be found at link time (``-L``) and at runtime
373 (``-rpath``). If you are using CMake, this invocation should produce working
376 .. code-block:: console
380 % CC=$HOME/toolchains/bin/gcc CXX=$HOME/toolchains/bin/g++ \
381 cmake .. -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,$HOME/toolchains/lib64 -L$HOME/toolchains/lib64"
383 If you fail to set rpath, most LLVM binaries will fail on startup with a message
385 found``. This means you need to tweak the -rpath linker flag.
390 with Clang and then use it with the ``-stdlib=libc++`` compile and link flag,
391 or install Clang into the same prefix (``$HOME/toolchains`` above) as GCC.
393 can also add an explicit prefix for Clang to look in for a GCC toolchain with
394 the ``--gcc-toolchain=/opt/my/gcc/prefix`` flag, passing it to both compile and
395 link commands when using your just-built-Clang to bootstrap.
397 .. _Getting Started with LLVM:
399 Getting Started with LLVM
402 The remainder of this guide is meant to get you up and running with LLVM and to
403 give you some basic information about the LLVM environment.
405 The later sections of this guide describe the `general layout`_ of the LLVM
406 source tree, a `simple example`_ using the LLVM tool chain, and `links`_ to find
407 more information about LLVM or to get help via e-mail.
410 ------------------------
420 This is the top level directory of the LLVM source tree.
424 This is the top level directory of the LLVM object tree (i.e. the tree where
428 Unpacking the LLVM Archives
429 ---------------------------
431 If you have the LLVM distribution, you will need to unpack it before you can
432 begin to compile it. LLVM is distributed as a set of two files: the LLVM suite
433 and the LLVM GCC front end compiled for your platform. There is an additional
439 ``llvm-x.y.tar.gz``
441 Source release for the LLVM libraries and tools.
443 ``llvm-test-x.y.tar.gz``
445 Source release for the LLVM test-suite.
449 Checkout LLVM from Subversion
450 -----------------------------
456 * ``cd where-you-want-llvm-to-live``
457 * Read-Only: ``svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm``
458 * Read-Write: ``svn co https://user@llvm.org/svn/llvm-project/llvm/trunk llvm``
460 This will create an '``llvm``' directory in the current directory and fully
461 populate it with the LLVM source code, Makefiles, test directories, and local
495 If you would like to get the LLVM test suite (a separate package as of 1.4), you
498 .. code-block:: console
500 % cd llvm/projects
501 % svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
503 By placing it in the ``llvm/projects``, it will be automatically configured by
504 the LLVM cmake configuration.
507 ----------
509 Git mirrors are available for a number of LLVM subprojects. These mirrors sync
510 automatically with each Subversion commit and contain all necessary git-svn
511 marks (so, you can recreate git-svn metadata locally). Note that right now
512 mirrors reflect only ``trunk`` for each project. You can do the read-only Git
513 clone of LLVM via:
515 .. code-block:: console
517 % git clone http://llvm.org/git/llvm.git
521 .. code-block:: console
523 % cd llvm/tools
524 % git clone http://llvm.org/git/clang.git
526 If you want to check out compiler-rt (required to build the sanitizers), run:
528 .. code-block:: console
530 % cd llvm/projects
531 % git clone http://llvm.org/git/compiler-rt.git
535 .. code-block:: console
537 % cd llvm/projects
538 % git clone http://llvm.org/git/openmp.git
542 .. code-block:: console
544 % cd llvm/projects
545 % git clone http://llvm.org/git/libcxx.git
546 % git clone http://llvm.org/git/libcxxabi.git
550 .. code-block:: console
552 % cd llvm/projects
553 % git clone http://llvm.org/git/test-suite.git
556 pull --rebase`` instead of ``git pull`` to avoid generating a non-linear history
557 in your clone. To configure ``git pull`` to pass ``--rebase`` by default on the
560 .. code-block:: console
567 Please read `Developer Policy <DeveloperPolicy.html#one-off-patches>`_, too.
573 .. code-block:: console
575 % git diff --check master..mybranch
579 .. code-block:: console
583 It is a little different from svn-generated diff. git-diff-generated diff has
585 could be accepted with ``patch -p1 -N``.
587 But you may generate patchset with git-format-patch. It generates by-each-commit
590 .. code-block:: console
592 % git format-patch --no-attach master..mybranch -o /path/to/your/patchset
594 If you would like to send patches directly, you may use git-send-email or
595 git-imap-send. Here is an example to generate the patchset in Gmail's [Drafts].
597 .. code-block:: console
599 % git format-patch --attach master..mybranch --stdout | git imap-send
603 .. code-block:: ini
613 ; example for Japanese, "Modified UTF-7" encoded.
614 folder = "[Gmail]/&Tgtm+DBN-"
616 folder = "[Gmail]/&g0l6Pw-"
618 .. _developers-work-with-git-svn:
620 For developers to work with git-svn
623 To set up clone from which you can submit code using ``git-svn``, run:
625 .. code-block:: console
627 % git clone http://llvm.org/git/llvm.git
628 % cd llvm
629 % git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username>
630 % git config svn-remote.svn.fetch :refs/remotes/origin/master
631 % git svn rebase -l # -l avoids fetching ahead of the git mirror.
635 % git clone http://llvm.org/git/clang.git
637 % git svn init https://llvm.org/svn/llvm-project/cfe/trunk --username=<username>
638 % git config svn-remote.svn.fetch :refs/remotes/origin/master
639 % git svn rebase -l
641 Likewise for compiler-rt, libomp and test-suite.
643 To update this clone without generating git-svn tags that conflict with the
646 .. code-block:: console
650 % git svn rebase -l
653 git svn rebase -l)
655 Likewise for compiler-rt, libomp and test-suite.
661 For those who wish to be able to update an llvm repo/revert patches easily using
662 git-svn, please look in the directory for the scripts ``git-svnup`` and
663 ``git-svnrevert``.
666 just type ``git-svnup`` or ``git svnup`` and everything will just work.
668 If one wishes to revert a commit with git-svn, but do not want the git hash to
669 escape into the commit message, one can use the script ``git-svnrevert`` or
674 To commit back changes via git-svn, use ``git svn dcommit``:
676 .. code-block:: console
680 Note that git-svn will create one SVN commit for each Git commit you have pending,
685 please make sure your current branch is up-to-date (via fetch/rebase) before
688 The git-svn metadata can get out of sync after you mess around with branches and
692 .. code-block:: console
694 % rm -rf .git/svn
695 % git svn rebase -l
697 Please, refer to the Git-SVN manual (``man git-svn``) for more information.
699 Local LLVM Configuration
700 ------------------------
702 Once checked out from the Subversion repository, the LLVM suite source code must
706 ``*.inc`` files, and ``llvm/include/Config/config.h``.
709 ``-D<variable name>=<value>``. The following variables are some common options
710 used by people developing LLVM.
712 +-------------------------+----------------------------------------------------+
717 +-------------------------+----------------------------------------------------+
720 +-------------------------+----------------------------------------------------+
725 +-------------------------+----------------------------------------------------+
728 +-------------------------+----------------------------------------------------+
731 | | equivalent to the ``--enable-targets`` option in |
734 | | out-of-tree targets. The default value includes: |
738 +-------------------------+----------------------------------------------------+
739 | LLVM_ENABLE_DOXYGEN | Build doxygen-based documentation from the source |
742 +-------------------------+----------------------------------------------------+
743 | LLVM_ENABLE_SPHINX | Build sphinx-based documentation from the source |
746 +-------------------------+----------------------------------------------------+
748 | | default set of LLVM components that can be |
750 | | default contains most of LLVM and is defined in |
751 | | ``tools/llvm-shlib/CMakelists.txt``. |
752 +-------------------------+----------------------------------------------------+
754 | | the LLVM build. This can dramatically speed up |
756 +-------------------------+----------------------------------------------------+
758 To configure LLVM, follow these steps:
762 .. code-block:: console
768 .. code-block:: console
770 % cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=prefix=/install/path
773 Compiling the LLVM Suite Source Code
774 ------------------------------------
777 If you want to change your build type, you can re-run cmake with the following
780 .. code-block:: console
782 % cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=type SRC_ROOT
796 optimization level is -O3. This can be configured by setting the
802 debug information. CMakes default optimization level is -O2. This can be
806 Once you have LLVM configured, you can build it by entering the *OBJ_ROOT*
809 .. code-block:: console
814 GCC that is known not to compile LLVM.
820 .. code-block:: console
822 % make -j2
824 There are several special targets which are useful when working with the LLVM
834 Installs LLVM header files, libraries, tools, and documentation in a hierarchy
838 ``make docs-llvm-html``
840 If configured with ``-DLLVM_ENABLE_SPHINX=On``, this will generate a directory
843 Cross-Compiling LLVM
844 --------------------
846 It is possible to cross-compile LLVM itself. That is, you can create LLVM
849 cross-compiling CMake provides a variable ``CMAKE_TOOLCHAIN_FILE`` which can
857 .. code-block:: console
859 % cmake -G "Ninja" -DCMAKE_OSX_ARCHITECTURES="armv7;armv7s;arm64"
860 -DCMAKE_TOOLCHAIN_FILE=<PATH_TO_LLVM>/cmake/platforms/iOS.cmake
861 -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_RUNTIME=Off -DLLVM_INCLUDE_TESTS=Off
862 -DLLVM_INCLUDE_EXAMPLES=Off -DLLVM_ENABLE_BACKTRACES=Off [options]
868 Check :doc:`HowToCrossCompileLLVM` and `Clang docs on how to cross-compile in general
869 <http://clang.llvm.org/docs/CrossCompilation.html>`_ for more information
870 about cross-compiling.
872 The Location of LLVM Object Files
873 ---------------------------------
875 The LLVM build system is capable of sharing a single LLVM source tree among
876 several LLVM builds. Hence, it is possible to build LLVM for several different
879 * Change directory to where the LLVM object files should live:
881 .. code-block:: console
887 .. code-block:: console
889 % cmake -G "Unix Makefiles" SRC_ROOT
891 The LLVM build will create a structure underneath *OBJ_ROOT* that matches the
892 LLVM source tree. At each level where source files are present in the source
899 .. code-block:: console
902 % find lib/Support/ -name APFloat*
906 ----------------------------
911 execute LLVM bitcode files directly. To do this, use commands like this (the
914 .. code-block:: console
916 % mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
917 % echo ':llvm:M::BC::/path/to/lli:' > /proc/sys/fs/binfmt_misc/register
921 This allows you to execute LLVM bitcode files directly. On Debian, you can also
924 .. code-block:: console
926 % sudo update-binfmts --install llvm /path/to/lli --magic 'BC'
934 One useful source of information about the LLVM source base is the LLVM `doxygen
936 `<http://llvm.org/doxygen/>`_. The following is a brief introduction to code
939 ``llvm/examples``
940 -----------------
942 Simple examples using the LLVM IR and JIT.
944 ``llvm/include``
945 ----------------
947 Public header files exported from the LLVM library. The three main subdirectories:
949 ``llvm/include/llvm``
951 All LLVM-specific header files, and subdirectories for different portions of
952 LLVM: ``Analysis``, ``CodeGen``, ``Target``, ``Transforms``, etc...
954 ``llvm/include/llvm/Support``
956 Generic support libraries provided with LLVM but not necessarily specific to
957 LLVM. For example, some C++ STL utilities and a Command Line option processing
960 ``llvm/include/llvm/Config``
967 ``llvm/lib``
968 ------------
970 Most source files are here. By putting code in libraries, LLVM makes it easy to
973 ``llvm/lib/IR/``
975 Core LLVM source files that implement core classes like Instruction and
978 ``llvm/lib/AsmParser/``
980 Source code for the LLVM assembly language parser library.
982 ``llvm/lib/Bitcode/``
986 ``llvm/lib/Analysis/``
991 ``llvm/lib/Transforms/``
993 IR-to-IR program transformations, such as Aggressive Dead Code Elimination,
997 ``llvm/lib/Target/``
1000 ``llvm/lib/Target/X86`` holds the X86 machine description.
1002 ``llvm/lib/CodeGen/``
1007 ``llvm/lib/MC/``
1011 ``llvm/lib/ExecutionEngine/``
1014 JIT-compiled scenarios.
1016 ``llvm/lib/Support/``
1018 Source code that corresponding to the header files in ``llvm/include/ADT/``
1019 and ``llvm/include/Support/``.
1021 ``llvm/projects``
1022 -----------------
1024 Projects not strictly part of LLVM but shipped with LLVM. This is also the
1025 directory for creating your own LLVM-based projects which leverage the LLVM
1028 ``llvm/test``
1029 -------------
1031 Feature and regression tests and other sanity checks on LLVM infrastructure. These
1034 ``test-suite``
1035 --------------
1037 A comprehensive correctness, performance, and benchmarking test suite for LLVM.
1038 Comes in a separate Subversion module because not every LLVM user is interested
1044 ``llvm/tools``
1045 --------------
1049 for a tool by typing ``tool_name -help``. The following is a brief introduction
1061 ``llvm-ar``
1063 The archiver produces an archive containing the given LLVM bitcode files,
1066 ``llvm-as``
1068 The assembler transforms the human readable LLVM assembly to LLVM bitcode.
1070 ``llvm-dis``
1072 The disassembler transforms the LLVM bitcode to human readable LLVM assembly.
1074 ``llvm-link``
1076 ``llvm-link``, not surprisingly, links multiple LLVM modules into a single
1081 ``lli`` is the LLVM interpreter, which can directly execute LLVM bitcode
1083 Sparc, and PowerPC), by default, ``lli`` will function as a Just-In-Time
1089 ``llc`` is the LLVM backend compiler, which translates LLVM bitcode to a
1090 native code assembly file or to C code (with the ``-march=c`` option).
1094 ``opt`` reads LLVM bitcode, applies a series of LLVM to LLVM transformations
1096 bitcode. '``opt -help``' is a good way to get a list of the
1097 program transformations available in LLVM.
1099 ``opt`` can also run a specific analysis on an input LLVM bitcode
1103 ``llvm/utils``
1104 --------------
1106 Utilities for working with LLVM source code; some are part of the build process
1110 ``codegen-diff``
1112 ``codegen-diff`` finds differences between code that LLC
1115 the full user manual, run ```perldoc codegen-diff'``.
1119 Emacs and XEmacs syntax highlighting for LLVM assembly files and TableGen
1124 Finds and outputs all non-generated source files,
1127 for example: ``xemacs `utils/getsources.sh``` from the top of the LLVM source
1132 Performs an ``egrep -H -n`` on each source file in LLVM and
1141 you are in ``llvm/lib/Target/Sparc``, if ``makellvm`` is in your
1143 directory, switch to directory ``llvm/tools/llc`` and build it, causing a
1144 re-linking of LLC.
1154 vim syntax-highlighting for LLVM assembly files
1159 An Example Using the LLVM Tool Chain
1162 This section gives an example of using LLVM with the Clang front end.
1165 ------------------
1169 .. code-block:: c
1180 .. code-block:: console
1182 % clang hello.c -o hello
1186 Clang works just like GCC by default. The standard -S and -c arguments
1189 #. Next, compile the C file into an LLVM bitcode file:
1191 .. code-block:: console
1193 % clang -O3 -emit-llvm hello.c -c -o hello.bc
1195 The -emit-llvm option can be used with the -S or -c options to emit an LLVM
1197 the `standard LLVM tools <CommandGuide/index.html>`_ on the bitcode file.
1201 .. code-block:: console
1207 .. code-block:: console
1211 The second examples shows how to invoke the LLVM JIT, :doc:`lli
1214 #. Use the ``llvm-dis`` utility to take a look at the LLVM assembly code:
1216 .. code-block:: console
1218 % llvm-dis < hello.bc | less
1222 .. code-block:: console
1224 % llc hello.bc -o hello.s
1228 .. code-block:: console
1230 % /opt/SUNWspro/bin/cc -xarch=v9 hello.s -o hello.native # On Solaris
1232 % gcc hello.s -o hello.native # On others
1236 .. code-block:: console
1241 ``-emit-llvm`` option is not present) does steps 6/7/8 for you.
1246 If you are having problems building or using LLVM, or if you have any other
1247 general questions about LLVM, please consult the `Frequently Asked
1255 This document is just an **introduction** on how to use LLVM to do some simple
1258 write something up!). For more information about LLVM, check out:
1260 * `LLVM Homepage <http://llvm.org/>`_
1261 * `LLVM Doxygen Tree <http://llvm.org/doxygen/>`_
1262 * `Starting a Project that Uses LLVM <http://llvm.org/docs/Projects.html>`_