-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetting_started.html
233 lines (220 loc) · 9.45 KB
/
getting_started.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Getting Started: Building and Running lld — lld 11 documentation</title>
<link rel="stylesheet" href="_static/llvm.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Development" href="development.html" />
<link rel="prev" title="Linker Design" href="design.html" />
<style type="text/css">
table.right { float: right; margin-left: 20px; }
table.right td { border: 1px solid #ccc; }
</style>
</head><body>
<div class="logo">
<a href="index.html"><img src="_static/logo.png" alt="LLVM Documentation"/></a>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="development.html" title="Development"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="design.html" title="Linker Design"
accesskey="P">previous</a> |</li>
<li><a href="index.html">lld Home</a> | </li>
<li class="nav-item nav-item-1"><a href="AtomLLD.html" accesskey="U">ATOM-based lld</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Getting Started: Building and Running lld</a><ul>
<li><a class="reference internal" href="#building-lld">Building lld</a><ul>
<li><a class="reference internal" href="#on-unix-like-systems">On Unix-like Systems</a></li>
<li><a class="reference internal" href="#using-visual-studio">Using Visual Studio</a></li>
<li><a class="reference internal" href="#more-information">More Information</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="design.html"
title="previous chapter">Linker Design</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="development.html"
title="next chapter">Development</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/getting_started.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="getting-started-building-and-running-lld">
<span id="getting-started"></span><h1>Getting Started: Building and Running lld<a class="headerlink" href="#getting-started-building-and-running-lld" title="Permalink to this headline">¶</a></h1>
<p>This page gives you the shortest path to checking out and building lld. If you
run into problems, please file bugs in the <a class="reference external" href="http://llvm.org/bugs/">LLVM Bugzilla</a></p>
<div class="section" id="building-lld">
<h2>Building lld<a class="headerlink" href="#building-lld" title="Permalink to this headline">¶</a></h2>
<div class="section" id="on-unix-like-systems">
<h3>On Unix-like Systems<a class="headerlink" href="#on-unix-like-systems" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Get the required tools.</li>
</ol>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="http://www.cmake.org/cmake/resources/software.html">CMake 2.8</a>+.</li>
<li>make (or any build system CMake supports).</li>
<li><a class="reference external" href="http://clang.llvm.org/">Clang 3.1</a>+ or GCC 4.7+ (C++11 support is required).<ul>
<li>If using Clang, you will also need <a class="reference external" href="http://libcxx.llvm.org/">libc++</a>.</li>
</ul>
</li>
<li><a class="reference external" href="http://python.org/download/">Python 2.4</a>+ (not 3.x) for running tests.</li>
</ul>
</div></blockquote>
<ol class="arabic" start="2">
<li><p class="first">Check out LLVM and subprojects (including lld):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ git clone https://github.com/llvm/llvm-project.git
</pre></div>
</div>
</li>
</ol>
<ol class="arabic" start="4">
<li><p class="first">Build LLVM and lld:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd llvm-project
$ mkdir build && cd build
$ cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS=lld ../llvm
$ make
</pre></div>
</div>
</li>
</ol>
<blockquote>
<div><ul>
<li><p class="first">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:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cmake -DCMAKE_CXX_COMPILER=/path/to/clang++ -DCMAKE_C_COMPILER=/path/to/clang ...
</pre></div>
</div>
</li>
</ul>
</div></blockquote>
<ol class="arabic" start="5">
<li><p class="first">Test:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make check-lld
</pre></div>
</div>
</li>
</ol>
</div>
<div class="section" id="using-visual-studio">
<h3>Using Visual Studio<a class="headerlink" href="#using-visual-studio" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Get the required tools.</li>
</ol>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="http://www.cmake.org/cmake/resources/software.html">CMake 2.8</a>+.</li>
<li><a class="reference external" href="http://www.microsoft.com/visualstudio/11/en-us">Visual Studio 12 (2013) or later</a> (required for C++11 support)</li>
<li><a class="reference external" href="http://python.org/download/">Python 2.4</a>+ (not 3.x) for running tests.</li>
</ul>
</div></blockquote>
<ol class="arabic">
<li><p class="first">Check out LLVM as above.</p>
</li>
<li><p class="first">Generate Visual Studio project files:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd llvm-project/build (out of source build required)
$ cmake -G "Visual Studio 11" -DLLVM_ENABLE_PROJECTS=lld ../llvm
</pre></div>
</div>
</li>
<li><p class="first">Build</p>
</li>
</ol>
<blockquote>
<div><ul class="simple">
<li>Open LLVM.sln in Visual Studio.</li>
<li>Build the <code class="docutils literal notranslate"><span class="pre">ALL_BUILD</span></code> target.</li>
</ul>
</div></blockquote>
<ol class="arabic simple">
<li>Test</li>
</ol>
<blockquote>
<div><ul class="simple">
<li>Build the <code class="docutils literal notranslate"><span class="pre">lld-test</span></code> target.</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="more-information">
<h3>More Information<a class="headerlink" href="#more-information" title="Permalink to this headline">¶</a></h3>
<p>For more information on using CMake see the <a class="reference external" href="http://llvm.org/docs/CMake.html">LLVM CMake guide</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="development.html" title="Development"
>next</a> |</li>
<li class="right" >
<a href="design.html" title="Linker Design"
>previous</a> |</li>
<li><a href="index.html">lld Home</a> | </li>
<li class="nav-item nav-item-1"><a href="AtomLLD.html" >ATOM-based lld</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2011-2020, LLVM Project.
Last updated on 2020-02-14.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
</div>
</body>
</html>