llvm-capstone/lld/docs/getting_started.rst
James Y Knight 5d71fc5d7b Adjust documentation for git migration.
This fixes most references to the paths:
 llvm.org/svn/
 llvm.org/git/
 llvm.org/viewvc/
 github.com/llvm-mirror/
 github.com/llvm-project/
 reviews.llvm.org/diffusion/

to instead point to https://github.com/llvm/llvm-project.

This is *not* a trivial substitution, because additionally, all the
checkout instructions had to be migrated to instruct users on how to
use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of
checking out various projects into various subdirectories.

I've attempted to not change any scripts here, only documentation. The
scripts will have to be addressed separately.

Additionally, I've deleted one document which appeared to be outdated
and unneeded:
  lldb/docs/building-with-debug-llvm.txt

Differential Revision: https://reviews.llvm.org/D57330

llvm-svn: 352514
2019-01-29 16:37:27 +00:00

88 lines
2.3 KiB
ReStructuredText

.. _getting_started:
Getting Started: Building and Running lld
=========================================
This page gives you the shortest path to checking out and building lld. If you
run into problems, please file bugs in the `LLVM Bugzilla`__
__ http://llvm.org/bugs/
Building lld
------------
On Unix-like Systems
~~~~~~~~~~~~~~~~~~~~
1. Get the required tools.
* `CMake 2.8`_\+.
* make (or any build system CMake supports).
* `Clang 3.1`_\+ or GCC 4.7+ (C++11 support is required).
* If using Clang, you will also need `libc++`_.
* `Python 2.4`_\+ (not 3.x) for running tests.
.. _CMake 2.8: http://www.cmake.org/cmake/resources/software.html
.. _Clang 3.1: http://clang.llvm.org/
.. _libc++: http://libcxx.llvm.org/
.. _Python 2.4: http://python.org/download/
2. Check out LLVM and subprojects (including lld)::
$ git clone https://github.com/llvm/llvm-project.git
4. Build LLVM and lld::
$ cd llvm-project
$ mkdir build && cd build
$ cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS=lld ../llvm
$ make
* If you want to build with clang and it is not the default compiler or
it is installed in an alternate location, you'll need to tell the cmake tool
the location of the C and C++ compiler via CMAKE_C_COMPILER and
CMAKE_CXX_COMPILER. For example::
$ cmake -DCMAKE_CXX_COMPILER=/path/to/clang++ -DCMAKE_C_COMPILER=/path/to/clang ...
5. Test::
$ make check-lld
Using Visual Studio
~~~~~~~~~~~~~~~~~~~
#. Get the required tools.
* `CMake 2.8`_\+.
* `Visual Studio 12 (2013) or later`_ (required for C++11 support)
* `Python 2.4`_\+ (not 3.x) for running tests.
.. _CMake 2.8: http://www.cmake.org/cmake/resources/software.html
.. _Visual Studio 12 (2013) or later: http://www.microsoft.com/visualstudio/11/en-us
.. _Python 2.4: http://python.org/download/
#. Check out LLVM as above.
#. Generate Visual Studio project files::
$ cd llvm-project/build (out of source build required)
$ cmake -G "Visual Studio 11" -DLLVM_ENABLE_PROJECTS=lld ../llvm
#. Build
* Open LLVM.sln in Visual Studio.
* Build the ``ALL_BUILD`` target.
#. Test
* Build the ``lld-test`` target.
More Information
~~~~~~~~~~~~~~~~
For more information on using CMake see the `LLVM CMake guide`_.
.. _LLVM CMake guide: http://llvm.org/docs/CMake.html