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       --src-root
104          Print the source root from which LLVM was built.
105
106       --system-libs
107          Print all the system libraries needed to link against the  specified
108          LLVM components, including any dependencies.
109
110       --targets-built
111          Print  the component names for all targets supported by this copy of
112          LLVM.
113
114       --version
115          Print the version number of LLVM.
116

COMPONENTS

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

EXIT STATUS

133       If  llvm-config  succeeds, it will exit with 0.  Otherwise, if an error
134       occurs, it will exit with a non-zero value.
135

AUTHOR

137       Maintained by the LLVM Team (https://llvm.org/).
138
140       2003-2023, LLVM Project
141
142
143
144
14515                                2023-07-20                    LLVM-CONFIG(1)
Impressum