1LLVM-CONFIG(1)                       LLVM                       LLVM-CONFIG(1)
2
3
4

NAME

6       llvm-config - Print LLVM compilation options
7

SYNOPSIS

9       llvm-config option [components...]
10

DESCRIPTION

12       llvm-config  makes  it  easier to build applications that use LLVM.  It
13       can print the compiler flags, linker flags and object libraries  needed
14       to link against LLVM.
15

EXAMPLES

17       To link against the JIT:
18
19          g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
20          g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
21              `llvm-config --libs engine bcreader scalaropts`
22

OPTIONS

24       --assertion-mode
25          Print the assertion mode used when LLVM was built (ON or OFF).
26
27       --bindir
28          Print the installation directory for LLVM binaries.
29
30       --build-mode
31          Print  the  build  mode  used when LLVM was built (e.g. Debug or Re‐
32          lease).
33
34       --build-system
35          Print the build system used to build LLVM (e.g. cmake or gn).
36
37       --cflags
38          Print the C compiler flags needed to use LLVM headers.
39
40       --cmakedir
41          Print the installation directory for LLVM CMake modules.
42
43       --components
44          Print all valid component names.
45
46       --cppflags
47          Print the C preprocessor flags needed to use LLVM headers.
48
49       --cxxflags
50          Print the C++ compiler flags needed to use LLVM headers.
51
52       --has-rtti
53          Print whether or not LLVM was built with rtti (YES or NO).
54
55       --help
56          Print a summary of llvm-config arguments.
57
58       --host-target
59          Print the target triple used to configure LLVM.
60
61       --ignore-libllvm
62          Ignore libLLVM and link component libraries instead.
63
64       --includedir
65          Print the installation directory for LLVM headers.
66
67       --ldflags
68          Print the flags needed to link against LLVM libraries.
69
70       --libdir
71          Print the installation directory for LLVM libraries.
72
73       --libfiles
74          Similar to --libs, but print the full path  to  each  library  file.
75          This is useful when creating makefile dependencies, to ensure that a
76          tool is relinked if any library it uses changes.
77
78       --libnames
79          Similar to --libs, but prints the bare filenames  of  the  libraries
80          without  -l  or pathnames.  Useful for linking against a not-yet-in‐
81          stalled copy of LLVM.
82
83       --libs
84          Print all the libraries needed to link against  the  specified  LLVM
85          components, including any dependencies.
86
87       --link-shared
88          Link the components as shared libraries.
89
90       --link-static
91          Link the component libraries statically.
92
93       --obj-root
94          Print the object root used to build LLVM.
95
96       --prefix
97          Print the installation prefix for LLVM.
98
99       --shared-mode
100          Print how the provided components can be collectively linked (shared
101          or static).
102
103       --system-libs
104          Print all the system libraries needed to link against the  specified
105          LLVM components, including any dependencies.
106
107       --targets-built
108          Print  the component names for all targets supported by this copy of
109          LLVM.
110
111       --version
112          Print the version number of LLVM.
113

COMPONENTS

115       To print a list of all available components, run  llvm-config  --compo‐
116       nents.   In  most  cases,  components  correspond  directly to LLVM li‐
117       braries.  Useful "virtual" components include:
118
119       all
120          Includes all LLVM libraries.  The default if no components are spec‐
121          ified.
122
123       backend
124          Includes either a native backend or the C backend.
125
126       engine
127          Includes either a native JIT or the bitcode interpreter.
128

EXIT STATUS

130       If  llvm-config  succeeds, it will exit with 0.  Otherwise, if an error
131       occurs, it will exit with a non-zero value.
132

AUTHOR

134       Maintained by the LLVM Team (https://llvm.org/).
135
137       2003-2023, LLVM Project
138
139
140
141
14216                                2023-08-24                    LLVM-CONFIG(1)
Impressum