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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
|
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "LLVM-CONFIG" "1" "2023-10-21" "16" "LLVM"
.SH NAME
llvm-config \- Print LLVM compilation options
.SH SYNOPSIS
.sp
\fBllvm\-config\fP \fIoption\fP [\fIcomponents\fP\&...]
.SH DESCRIPTION
.sp
\fBllvm\-config\fP makes it easier to build applications that use LLVM. It can
print the compiler flags, linker flags and object libraries needed to link
against LLVM.
.SH EXAMPLES
.sp
To link against the JIT:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
g++ \(gallvm\-config \-\-cxxflags\(ga \-o HowToUseJIT.o \-c HowToUseJIT.cpp
g++ \(gallvm\-config \-\-ldflags\(ga \-o HowToUseJIT HowToUseJIT.o \e
\(gallvm\-config \-\-libs engine bcreader scalaropts\(ga
.ft P
.fi
.UNINDENT
.UNINDENT
.SH OPTIONS
.sp
\fB\-\-assertion\-mode\fP
.INDENT 0.0
.INDENT 3.5
Print the assertion mode used when LLVM was built (ON or OFF).
.UNINDENT
.UNINDENT
.sp
\fB\-\-bindir\fP
.INDENT 0.0
.INDENT 3.5
Print the installation directory for LLVM binaries.
.UNINDENT
.UNINDENT
.sp
\fB\-\-build\-mode\fP
.INDENT 0.0
.INDENT 3.5
Print the build mode used when LLVM was built (e.g. Debug or Release).
.UNINDENT
.UNINDENT
.sp
\fB\-\-build\-system\fP
.INDENT 0.0
.INDENT 3.5
Print the build system used to build LLVM (e.g. \fIcmake\fP or \fIgn\fP).
.UNINDENT
.UNINDENT
.sp
\fB\-\-cflags\fP
.INDENT 0.0
.INDENT 3.5
Print the C compiler flags needed to use LLVM headers.
.UNINDENT
.UNINDENT
.sp
\fB\-\-cmakedir\fP
.INDENT 0.0
.INDENT 3.5
Print the installation directory for LLVM CMake modules.
.UNINDENT
.UNINDENT
.sp
\fB\-\-components\fP
.INDENT 0.0
.INDENT 3.5
Print all valid component names.
.UNINDENT
.UNINDENT
.sp
\fB\-\-cppflags\fP
.INDENT 0.0
.INDENT 3.5
Print the C preprocessor flags needed to use LLVM headers.
.UNINDENT
.UNINDENT
.sp
\fB\-\-cxxflags\fP
.INDENT 0.0
.INDENT 3.5
Print the C++ compiler flags needed to use LLVM headers.
.UNINDENT
.UNINDENT
.sp
\fB\-\-has\-rtti\fP
.INDENT 0.0
.INDENT 3.5
Print whether or not LLVM was built with rtti (YES or NO).
.UNINDENT
.UNINDENT
.sp
\fB\-\-help\fP
.INDENT 0.0
.INDENT 3.5
Print a summary of \fBllvm\-config\fP arguments.
.UNINDENT
.UNINDENT
.sp
\fB\-\-host\-target\fP
.INDENT 0.0
.INDENT 3.5
Print the target triple used to configure LLVM.
.UNINDENT
.UNINDENT
.sp
\fB\-\-ignore\-libllvm\fP
.INDENT 0.0
.INDENT 3.5
Ignore libLLVM and link component libraries instead.
.UNINDENT
.UNINDENT
.sp
\fB\-\-includedir\fP
.INDENT 0.0
.INDENT 3.5
Print the installation directory for LLVM headers.
.UNINDENT
.UNINDENT
.sp
\fB\-\-ldflags\fP
.INDENT 0.0
.INDENT 3.5
Print the flags needed to link against LLVM libraries.
.UNINDENT
.UNINDENT
.sp
\fB\-\-libdir\fP
.INDENT 0.0
.INDENT 3.5
Print the installation directory for LLVM libraries.
.UNINDENT
.UNINDENT
.sp
\fB\-\-libfiles\fP
.INDENT 0.0
.INDENT 3.5
Similar to \fB\-\-libs\fP, but print the full path to each library file. This is
useful when creating makefile dependencies, to ensure that a tool is relinked if
any library it uses changes.
.UNINDENT
.UNINDENT
.sp
\fB\-\-libnames\fP
.INDENT 0.0
.INDENT 3.5
Similar to \fB\-\-libs\fP, but prints the bare filenames of the libraries
without \fB\-l\fP or pathnames. Useful for linking against a not\-yet\-installed
copy of LLVM.
.UNINDENT
.UNINDENT
.sp
\fB\-\-libs\fP
.INDENT 0.0
.INDENT 3.5
Print all the libraries needed to link against the specified LLVM
\fIcomponents\fP, including any dependencies.
.UNINDENT
.UNINDENT
.sp
\fB\-\-link\-shared\fP
.INDENT 0.0
.INDENT 3.5
Link the components as shared libraries.
.UNINDENT
.UNINDENT
.sp
\fB\-\-link\-static\fP
.INDENT 0.0
.INDENT 3.5
Link the component libraries statically.
.UNINDENT
.UNINDENT
.sp
\fB\-\-obj\-root\fP
.INDENT 0.0
.INDENT 3.5
Print the object root used to build LLVM.
.UNINDENT
.UNINDENT
.sp
\fB\-\-prefix\fP
.INDENT 0.0
.INDENT 3.5
Print the installation prefix for LLVM.
.UNINDENT
.UNINDENT
.sp
\fB\-\-shared\-mode\fP
.INDENT 0.0
.INDENT 3.5
Print how the provided components can be collectively linked (\fIshared\fP or \fIstatic\fP).
.UNINDENT
.UNINDENT
.sp
\fB\-\-system\-libs\fP
.INDENT 0.0
.INDENT 3.5
Print all the system libraries needed to link against the specified LLVM
\fIcomponents\fP, including any dependencies.
.UNINDENT
.UNINDENT
.sp
\fB\-\-targets\-built\fP
.INDENT 0.0
.INDENT 3.5
Print the component names for all targets supported by this copy of LLVM.
.UNINDENT
.UNINDENT
.sp
\fB\-\-version\fP
.INDENT 0.0
.INDENT 3.5
Print the version number of LLVM.
.UNINDENT
.UNINDENT
.SH COMPONENTS
.sp
To print a list of all available components, run \fBllvm\-config
\-\-components\fP\&. In most cases, components correspond directly to LLVM
libraries. Useful \(dqvirtual\(dq components include:
.sp
\fBall\fP
.INDENT 0.0
.INDENT 3.5
Includes all LLVM libraries. The default if no components are specified.
.UNINDENT
.UNINDENT
.sp
\fBbackend\fP
.INDENT 0.0
.INDENT 3.5
Includes either a native backend or the C backend.
.UNINDENT
.UNINDENT
.sp
\fBengine\fP
.INDENT 0.0
.INDENT 3.5
Includes either a native JIT or the bitcode interpreter.
.UNINDENT
.UNINDENT
.SH EXIT STATUS
.sp
If \fBllvm\-config\fP succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non\-zero value.
.SH AUTHOR
Maintained by the LLVM Team (https://llvm.org/).
.SH COPYRIGHT
2003-2023, LLVM Project
.\" Generated by docutils manpage writer.
.
|