-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows_support.html
207 lines (194 loc) · 10.8 KB
/
windows_support.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
<!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>Windows support — 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="Partitions" href="Partitions.html" />
<link rel="prev" title="WebAssembly lld port" href="WebAssembly.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="Partitions.html" title="Partitions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="WebAssembly.html" title="WebAssembly lld port"
accesskey="P">previous</a> |</li>
<li><a href="index.html">lld Home</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="#">Windows support</a><ul>
<li><a class="reference internal" href="#development-status">Development status</a></li>
<li><a class="reference internal" href="#downloading-lld">Downloading LLD</a></li>
<li><a class="reference internal" href="#building-lld">Building LLD</a><ul>
<li><a class="reference internal" href="#using-visual-studio-ide-msbuild">Using Visual Studio IDE/MSBuild</a></li>
<li><a class="reference internal" href="#using-ninja">Using Ninja</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="WebAssembly.html"
title="previous chapter">WebAssembly lld port</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Partitions.html"
title="next chapter">Partitions</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/windows_support.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">
<style type="text/css">
.none { background-color: #FFCCCC }
.partial { background-color: #FFFF99 }
.good { background-color: #CCFF99 }
</style><div class="section" id="windows-support">
<h1>Windows support<a class="headerlink" href="#windows-support" title="Permalink to this headline">¶</a></h1>
<p>LLD supports Windows operating system. When invoked as <code class="docutils literal notranslate"><span class="pre">lld-link.exe</span></code> or with
<code class="docutils literal notranslate"><span class="pre">-flavor</span> <span class="pre">link</span></code>, the driver for Windows operating system is used to parse
command line options, and it drives further linking processes. LLD accepts
almost all command line options that the linker shipped with Microsoft Visual
C++ (link.exe) supports.</p>
<p>The current status is that LLD is used to link production builds of large
real-world binaries such as Firefox and Chromium.</p>
<div class="section" id="development-status">
<h2>Development status<a class="headerlink" href="#development-status" title="Permalink to this headline">¶</a></h2>
<dl class="docutils">
<dt>Driver</dt>
<dd><span class="good">Mostly done</span>. Some exotic command line options that are not usually
used for application development, such as <code class="docutils literal notranslate"><span class="pre">/DRIVER</span></code>, are not supported.</dd>
<dt>Linking against DLL</dt>
<dd><span class="good">Done</span>. LLD can read import libraries needed to link against DLL. Both
export-by-name and export-by-ordinal are supported.</dd>
<dt>Linking against static library</dt>
<dd><span class="good">Done</span>. The format of static library (.lib) on Windows is actually the
same as on Unix (.a). LLD can read it.</dd>
<dt>Creating DLL</dt>
<dd><span class="good">Done</span>. LLD creates a DLL if <code class="docutils literal notranslate"><span class="pre">/DLL</span></code> option is given. Exported
functions can be specified either via command line (<code class="docutils literal notranslate"><span class="pre">/EXPORT</span></code>) or via
module-definition file (.def). Both export-by-name and export-by-ordinal are
supported.</dd>
<dt>Windows resource files support</dt>
<dd><span class="good">Done</span>. If an <code class="docutils literal notranslate"><span class="pre">.res</span></code> file is given, LLD converts the file to a COFF
file using LLVM’s Object library.</dd>
<dt>Safe Structured Exception Handler (SEH)</dt>
<dd><span class="good">Done</span> for both x86 and x64.</dd>
<dt>Module-definition file</dt>
<dd><span class="partial">Partially done</span>. LLD currently recognizes these directives:
<code class="docutils literal notranslate"><span class="pre">EXPORTS</span></code>, <code class="docutils literal notranslate"><span class="pre">HEAPSIZE</span></code>, <code class="docutils literal notranslate"><span class="pre">STACKSIZE</span></code>, <code class="docutils literal notranslate"><span class="pre">NAME</span></code>, and <code class="docutils literal notranslate"><span class="pre">VERSION</span></code>.</dd>
<dt>Debug info</dt>
<dd><span class="good">Done</span>. LLD can emit PDBs that are at parity with those generated by
link.exe. However, LLD does not support /DEBUG:FASTLINK.</dd>
</dl>
</div>
<div class="section" id="downloading-lld">
<h2>Downloading LLD<a class="headerlink" href="#downloading-lld" title="Permalink to this headline">¶</a></h2>
<p>The Windows version of LLD is included in the <a class="reference external" href="https://releases.llvm.org/download.html">pre-built binaries of LLVM’s
releases</a> and in the <a class="reference external" href="https://llvm.org/builds/">LLVM Snapshot
Builds</a>.</p>
</div>
<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="using-visual-studio-ide-msbuild">
<h3>Using Visual Studio IDE/MSBuild<a class="headerlink" href="#using-visual-studio-ide-msbuild" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Check out LLVM and LLD from the LLVM SVN repository (or Git mirror),</li>
<li>run <code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">-G</span> <span class="pre">"Visual</span> <span class="pre">Studio</span> <span class="pre">12"</span> <span class="pre"><llvm-source-dir></span></code> from VS command prompt,</li>
<li>open LLVM.sln with Visual Studio, and</li>
<li>build <code class="docutils literal notranslate"><span class="pre">lld</span></code> target in <code class="docutils literal notranslate"><span class="pre">lld</span> <span class="pre">executables</span></code> folder</li>
</ol>
<p>Alternatively, you can use msbuild if you don’t like to work in an IDE:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">msbuild</span> <span class="n">LLVM</span><span class="o">.</span><span class="n">sln</span> <span class="o">/</span><span class="n">m</span> <span class="o">/</span><span class="n">target</span><span class="p">:</span><span class="s2">"lld executables\lld"</span>
</pre></div>
</div>
<p>MSBuild.exe had been shipped as a component of the .NET framework, but since
2013 it’s part of Visual Studio. You can find it at “C:\Program Files
(x86)\msbuild”.</p>
<p>You can build LLD as a 64 bit application. To do that, open VS2013 x64 command
prompt and run cmake for “Visual Studio 12 Win64” target.</p>
</div>
<div class="section" id="using-ninja">
<h3>Using Ninja<a class="headerlink" href="#using-ninja" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Check out LLVM and LLD from the LLVM SVN repository (or Git mirror),</li>
<li>run <code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">-G</span> <span class="pre">ninja</span> <span class="pre"><llvm-source-dir></span></code> from VS command prompt,</li>
<li>run <code class="docutils literal notranslate"><span class="pre">ninja</span> <span class="pre">lld</span></code></li>
</ol>
</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="Partitions.html" title="Partitions"
>next</a> |</li>
<li class="right" >
<a href="WebAssembly.html" title="WebAssembly lld port"
>previous</a> |</li>
<li><a href="index.html">lld Home</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>