.\" 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" "2024-02-26" "15" "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 .EX 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 .EE .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–src\-root\fP .INDENT 0.0 .INDENT 3.5 Print the source root from which LLVM was built. .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 “virtual” 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-2024, LLVM Project .\" Generated by docutils manpage writer. .