diff --git a/llvm/docs/CommandGuide/llvm-config.rst b/llvm/docs/CommandGuide/llvm-config.rst --- a/llvm/docs/CommandGuide/llvm-config.rst +++ b/llvm/docs/CommandGuide/llvm-config.rst @@ -29,50 +29,75 @@ OPTIONS ------- -**--version** +**--assertion-mode** - Print the version number of LLVM. + Print the assertion mode used when LLVM was built (ON or OFF). -**-help** +**--bindir** - Print a summary of **llvm-config** arguments. + Print the installation directory for LLVM binaries. -**--prefix** +**--build-mode** - Print the installation prefix for LLVM. + Print the build mode used when LLVM was built (e.g. Debug or Release). -**--src-root** +**--build-system** - Print the source root from which LLVM was built. + Print the build system used to build LLVM (e.g. `cmake` or `gn`). -**--obj-root** +**--cflags** - Print the object root used to build LLVM. + Print the C compiler flags needed to use LLVM headers. -**--bindir** +**--cmakedir** - Print the installation directory for LLVM binaries. + Print the installation directory for LLVM CMake modules. -**--includedir** +**--components** - Print the installation directory for LLVM headers. + Print all valid component names. -**--libdir** +**--cppflags** - Print the installation directory for LLVM libraries. + Print the C preprocessor flags needed to use LLVM headers. **--cxxflags** Print the C++ compiler flags needed to use LLVM headers. +**--has-rtti** + + Print whether or not LLVM was built with rtti (YES or NO). + +**--help** + + Print a summary of **llvm-config** arguments. + +**--host-target** + + Print the target triple used to configure LLVM. + +**--ignore-libllvm** + + Ignore libLLVM and link component libraries instead. + +**--includedir** + + Print the installation directory for LLVM headers. + **--ldflags** Print the flags needed to link against LLVM libraries. -**--libs** +**--libdir** - Print all the libraries needed to link against the specified LLVM - *components*, including any dependencies. + Print the installation directory for LLVM libraries. + +**--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. **--libnames** @@ -80,23 +105,47 @@ without **-l** or pathnames. Useful for linking against a not-yet-installed copy of LLVM. -**--libfiles** +**--libs** - 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. + Print all the libraries needed to link against the specified LLVM + *components*, including any dependencies. -**--components** +**--link-shared** - Print all valid component names. + Link the components as shared libraries. + +**--link-static** + + Link the component libraries statically. + +**--obj-root** + + Print the object root used to build LLVM. + +**--prefix** + + Print the installation prefix for LLVM. + +**--shared-mode** + + Print how the provided components can be collectively linked (`shared` or `static`). + +**--src-root** + + Print the source root from which LLVM was built. + +**--system-libs** + + Print all the system libraries needed to link against the specified LLVM + *components*, including any dependencies. **--targets-built** Print the component names for all targets supported by this copy of LLVM. -**--build-mode** +**--version** - Print the build mode used when LLVM was built (e.g. Debug or Release) + Print the version number of LLVM. COMPONENTS diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp --- a/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp @@ -201,7 +201,7 @@ /* *** */ -static void usage() { +static void usage(bool ExitWithFailure = true) { errs() << "\ usage: llvm-config