Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

llvm-config (1)

Name

llvm-config - Print LLVM compilation options

Synopsis

llvm-config option [components...]

Description

LLVM-CONFIG(1)                       LLVM                       LLVM-CONFIG(1)



NAME
       llvm-config - Print LLVM compilation options

SYNOPSIS
       llvm-config option [components...]

DESCRIPTION
       llvm-config  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.

EXAMPLES
       To link against the JIT:

          g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
          g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
              `llvm-config --libs engine bcreader scalaropts`

OPTIONS
       --version
          Print the version number of LLVM.

       -help
          Print a summary of llvm-config arguments.

       --prefix
          Print the installation prefix for LLVM.

       --src-root
          Print the source root from which LLVM was built.

       --obj-root
          Print the object root used to build LLVM.

       --bindir
          Print the installation directory for LLVM binaries.

       --includedir
          Print the installation directory for LLVM headers.

       --libdir
          Print the installation directory for LLVM libraries.

       --cxxflags
          Print the C++ compiler flags needed to use LLVM headers.

       --ldflags
          Print the flags needed to link against LLVM libraries.

       --libs
          Print  all  the  libraries needed to link against the specified LLVM
          components, including any dependencies.

       --libnames
          Similar to --libs, but prints the bare filenames  of  the  libraries
          without   -l   or   pathnames.    Useful   for   linking  against  a
          not-yet-installed copy of LLVM.

       --libfiles
          Similar to --libs, 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.

       --components
          Print all valid component names.

       --targets-built
          Print the component names for all targets supported by this copy  of
          LLVM.

       --build-mode
          Print  the  build  mode  used  when  LLVM  was  built (e.g. Debug or
          Release)

COMPONENTS
       To print a list of all available components, run  llvm-config  --compo-
       nents.    In   most  cases,  components  correspond  directly  to  LLVM
       libraries.  Useful "virtual" components include:

       all
          Includes all LLVM libraries.  The default if no components are spec-
          ified.

       backend
          Includes either a native backend or the C backend.

       engine
          Includes either a native JIT or the bitcode interpreter.

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

AUTHOR
       Maintained by the LLVM Team (https://llvm.org/).

COPYRIGHT
       2003-2022, LLVM Project



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+---------------------+
       |ATTRIBUTE TYPE |  ATTRIBUTE VALUE    |
       +---------------+---------------------+
       |Availability   | developer/llvm/llvm |
       +---------------+---------------------+
       |Stability      | Uncommitted         |
       +---------------+---------------------+

NOTES
       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source    was    downloaded     from      https://github.com/llvm/llvm-
       project/releases/download/llvmorg-11.0.0/llvm-11.0.0.src.tar.xz.

       Further information about this software can be found on the open source
       community website at https://llvm.org/.



11                                2022-06-28                    LLVM-CONFIG(1)