• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:build +full:- +full:arg

1 //===-- llvm-config.cpp - LLVM project configuration utility --------------===//
8 //===----------------------------------------------------------------------===//
11 // use by other project's build environments (to determine installed path,
14 // Note that although this tool *may* be used by some parts of LLVM's build
18 //===----------------------------------------------------------------------===//
26 #include "llvm/Config/llvm-config.h"
37 // Include the build time variables we can report to the user. This is generated
38 // at build time from the BuildVariables.inc.in file by the build system.
46 // create entries for pseudo groups like x86 or all-targets.
49 // LinkMode determines what libraries and flags are returned by llvm-config.
66 /// \arg RequiredLibs.
68 /// \param Name - The component to traverse.
69 /// \param ComponentMap - A prebuilt map of component names to descriptors.
70 /// \param VisitedComponents [in] [out] - The set of already visited components.
71 /// \param RequiredLibs [out] - The ordered list of required
73 /// \param GetComponentNames - Get the component names instead of the
102 // Only include non-installed components if requested. in VisitComponent()
103 if (!AC->IsInstalled && !IncludeNonInstalled) in VisitComponent()
107 for (unsigned i = 0; AC->RequiredLibraries[i]; ++i) { in VisitComponent()
108 VisitComponent(AC->RequiredLibraries[i], ComponentMap, VisitedComponents, in VisitComponent()
119 if (AC->Library) { in VisitComponent()
121 std::string path = (*GetComponentLibraryPath)(AC->Library); in VisitComponent()
126 Missing->push_back(path); in VisitComponent()
128 RequiredLibs.push_back(AC->Library); in VisitComponent()
136 /// \param Components - The names of the components to find libraries for.
137 /// \param IncludeNonInstalled - Whether non-installed components should be
139 /// \param GetComponentNames - True if one would prefer the component names.
148 // Build a map of component names to information. in ComputeLibsForComponents()
152 ComponentMap[AC->Name] = AC; in ComputeLibsForComponents()
162 llvm::errs() << "llvm-config: unknown component name: " << Components[i] in ComputeLibsForComponents()
183 usage: llvm-config <OPTION>... [<COMPONENT>...]\n\ in usage()
187 llvm-config --cxxflags\n\ in usage()
188 llvm-config --ldflags\n\ in usage()
189 llvm-config --libs engine bcreader scalaropts\n\ in usage()
192 --version Print LLVM version.\n\ in usage()
193 --prefix Print the installation prefix.\n\ in usage()
194 --src-root Print the source root LLVM was built from.\n\ in usage()
195 --obj-root Print the object root used to build LLVM.\n\ in usage()
196 --bindir Directory containing LLVM executables.\n\ in usage()
197 --includedir Directory containing LLVM headers.\n\ in usage()
198 --libdir Directory containing LLVM libraries.\n\ in usage()
199 --cppflags C preprocessor flags for files that include LLVM headers.\n\ in usage()
200 --cflags C compiler flags for files that include LLVM headers.\n\ in usage()
201 --cxxflags C++ compiler flags for files that include LLVM headers.\n\ in usage()
202 --ldflags Print Linker flags.\n\ in usage()
203 --system-libs System Libraries needed to link against LLVM components.\n\ in usage()
204 --libs Libraries needed to link against LLVM components.\n\ in usage()
205 --libnames Bare library names for in-tree builds.\n\ in usage()
206 --libfiles Fully qualified library filenames for makefile depends.\n\ in usage()
207 --components List of all possible components.\n\ in usage()
208 --targets-built List of all targets currently built.\n\ in usage()
209 --host-target Target triple used to configure LLVM.\n\ in usage()
210 --build-mode Print build mode of LLVM tree (e.g. Debug or Release).\n\ in usage()
211 --assertion-mode Print assertion mode of LLVM tree (ON or OFF).\n\ in usage()
212 --build-system Print the build system used to build LLVM (always cmake).\n\ in usage()
213 --has-rtti Print whether or not LLVM was built with rtti (YES or NO).\n\ in usage()
214 --has-global-isel Print whether or not LLVM was built with global-isel support (YES or NO).\n\ in usage()
215--shared-mode Print how the provided components can be collectively linked (`shared` or `stati… in usage()
216 --link-shared Link the components as shared libraries.\n\ in usage()
217 --link-static Link the component libraries statically.\n\ in usage()
232 /// \brief Expand the semi-colon delimited LLVM_DYLIB_COMPONENTS into
263 // llvm-config is designed to support being run both from a development tree in main()
264 // and from an installed path. We try and auto-detect which case we are in so in main()
273 // If CMAKE_CFG_INTDIR is given, honor it as build mode. in main()
327 ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include"); in main()
333 ActiveIncludeOption = "-I" + ActiveIncludeDir; in main()
338 /// skipped if we're run from within the build dir. However, once installed, in main()
341 /// in the first place. This can't be done at configure/build time. in main()
386 (SharedPrefix + "LLVM-" + SharedVersionedExt).str(); in main()
389 // for "--libs", etc, if they exist. This behaviour can be overridden with in main()
390 // --link-static or --link-shared. in main()
401 // explicitly passes --link-shared. in main()
423 Out = Lib.slice(3, Lib.size() - FromEnd); in main()
455 StringRef Arg = argv[i]; in main() local
457 if (Arg.startswith("-")) { in main()
459 if (Arg == "--version") { in main()
461 } else if (Arg == "--prefix") { in main()
463 } else if (Arg == "--bindir") { in main()
465 } else if (Arg == "--includedir") { in main()
467 } else if (Arg == "--libdir") { in main()
469 } else if (Arg == "--cppflags") { in main()
471 } else if (Arg == "--cflags") { in main()
473 } else if (Arg == "--cxxflags") { in main()
475 } else if (Arg == "--ldflags") { in main()
476 OS << ((HostTriple.isWindowsMSVCEnvironment()) ? "-LIBPATH:" : "-L") in main()
478 } else if (Arg == "--system-libs") { in main()
480 } else if (Arg == "--libs") { in main()
482 } else if (Arg == "--libnames") { in main()
484 } else if (Arg == "--libfiles") { in main()
486 } else if (Arg == "--components") { in main()
492 // Only include non-installed components when in a development tree. in main()
520 } else if (Arg == "--targets-built") { in main()
522 } else if (Arg == "--host-target") { in main()
524 } else if (Arg == "--build-mode") { in main()
526 } else if (Arg == "--assertion-mode") { in main()
532 } else if (Arg == "--build-system") { in main()
534 } else if (Arg == "--has-rtti") { in main()
536 } else if (Arg == "--has-global-isel") { in main()
538 } else if (Arg == "--shared-mode") { in main()
540 } else if (Arg == "--obj-root") { in main()
542 } else if (Arg == "--src-root") { in main()
544 } else if (Arg == "--link-shared") { in main()
546 } else if (Arg == "--link-static") { in main()
552 Components.push_back(Arg); in main()
560 errs() << "llvm-config: error: " << DyLibName << " is missing\n"; in main()
593 errs() << "llvm-config: error: missing: " << Lib << "\n"; in main()
601 << "llvm-config: error: component libraries and shared library\n\n"; in main()
605 errs() << "llvm-config: error: missing: " << Lib << "\n"; in main()
649 // Elsewhere, if this is a typical library name, include it using -l. in main()
656 OS << "-l" << LibName; in main()
659 OS << "-l" << Lib; in main()
679 // Print SYSTEM_LIBS after --libs. in main()
684 errs() << "llvm-config: error: components given, but unused\n\n"; in main()