[LLVMdev] [PATCH] llvm-config: Use "all" components by default.

Johannes Obermayr johannesobermayr at gmx.de
Mon Dec 12 10:56:33 PST 2011


Otherwise you will receive an empty output for
llvm-config --libs
llvm-config --libnames
llvm-config --libfiles

Additionally it fulfills following statement:

Typical components:
  all               All LLVM libraries (default).
---
 tools/llvm-config/llvm-config.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index bf3357e..22db07e 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -301,6 +301,8 @@ int main(int argc, char **argv) {
 
   if (PrintLibs || PrintLibNames || PrintLibFiles) {
     // Construct the list of all the required libraries.
+    if (Components.empty())
+      Components.push_back("all");
     std::vector<StringRef> RequiredLibs;
     ComputeLibsForComponents(Components, RequiredLibs);
 
-- 
1.7.7




More information about the llvm-dev mailing list