Lines Matching +full:begin +full:- +full:after +full:- +full:commit +full:- +full:hash
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``
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``
59 * ``svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt``
63 * ``cd where-you-want-llvm-to-live``
65 * ``svn co http://llvm.org/svn/llvm-project/openmp/trunk openmp``
69 * ``cd where-you-want-llvm-to-live``
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``
78 * ``svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite``
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>`_
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
112 * ``-DCMAKE_BUILD_TYPE=type`` --- Valid options for *type* are Debug,
115 * ``-DLLVM_ENABLE_ASSERTIONS=On`` --- Compile with assertion checks enabled
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``.
143 Before you begin to use the LLVM system, review the requirements given below.
148 --------
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
193 --------
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 ------------------------------------------------------
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.
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
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)
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
381 cmake .. -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,$HOME/toolchains/lib64 -L$HOME/toolchains/lib64"
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,
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.
407 more information about LLVM or to get help via e-mail.
410 ------------------------
429 ---------------------------
432 begin to compile it. LLVM is distributed as a set of two files: the LLVM suite
439 ``llvm-x.y.tar.gz``
443 ``llvm-test-x.y.tar.gz``
445 Source release for the LLVM test-suite.
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``
498 .. code-block:: console
501 % svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
507 ----------
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
515 .. code-block:: console
521 .. code-block:: console
526 If you want to check out compiler-rt (required to build the sanitizers), run:
528 .. code-block:: console
531 % git clone http://llvm.org/git/compiler-rt.git
535 .. code-block:: console
542 .. code-block:: console
550 .. code-block:: console
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
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.
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.
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
670 ``git svnrevert`` which will take in the git hash for the commit you want to
672 references to the git hash have been replaced with the svn revision.
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,
681 so squash and edit each commit before executing ``dcommit`` to make sure they all
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.
700 ------------------------
709 ``-D<variable name>=<value>``. The following variables are some common options
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 +-------------------------+----------------------------------------------------+
751 | | ``tools/llvm-shlib/CMakelists.txt``. |
752 +-------------------------+----------------------------------------------------+
756 +-------------------------+----------------------------------------------------+
762 .. code-block:: console
768 .. code-block:: console
770 % cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=prefix=/install/path
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
809 .. code-block:: console
820 .. code-block:: console
822 % make -j2
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
870 about cross-compiling.
873 ---------------------------------
881 .. code-block:: console
887 .. code-block:: console
889 % cmake -G "Unix Makefiles" SRC_ROOT
899 .. code-block:: console
902 % find lib/Support/ -name APFloat*
906 ----------------------------
914 .. code-block:: console
916 % mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
924 .. code-block:: console
926 % sudo update-binfmts --install llvm /path/to/lli --magic 'BC'
940 -----------------
945 ----------------
951 All LLVM-specific header files, and subdirectories for different portions of
968 ------------
993 IR-to-IR program transformations, such as Aggressive Dead Code Elimination,
1014 JIT-compiled scenarios.
1022 -----------------
1025 directory for creating your own LLVM-based projects which leverage the LLVM
1029 -------------
1034 ``test-suite``
1035 --------------
1045 --------------
1049 for a tool by typing ``tool_name -help``. The following is a brief introduction
1061 ``llvm-ar``
1066 ``llvm-as``
1070 ``llvm-dis``
1074 ``llvm-link``
1076 ``llvm-link``, not surprisingly, links multiple LLVM modules into a single
1083 Sparc, and PowerPC), by default, ``lli`` will function as a Just-In-Time
1090 native code assembly file or to C code (with the ``-march=c`` option).
1096 bitcode. '``opt -help``' is a good way to get a list of the
1104 --------------
1110 ``codegen-diff``
1112 ``codegen-diff`` finds differences between code that LLC
1115 the full user manual, run ```perldoc codegen-diff'``.
1124 Finds and outputs all non-generated source files,
1132 Performs an ``egrep -H -n`` on each source file in LLVM and
1144 re-linking of LLC.
1154 vim syntax-highlighting for LLVM assembly files
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
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
1201 .. code-block:: console
1207 .. code-block:: console
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.