[llvm] r289605 - [llvm-config] Add --ignore-libllvm

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 14:17:59 PST 2016


Author: cbieneman
Date: Tue Dec 13 16:17:59 2016
New Revision: 289605

URL: http://llvm.org/viewvc/llvm-project?rev=289605&view=rev
Log:
[llvm-config] Add --ignore-libllvm

This flag forces off linking libLLVM. This should resolve some issues reported on llvm-commits.

Modified:
    llvm/trunk/test/tools/llvm-config/libs.test
    llvm/trunk/tools/llvm-config/llvm-config.cpp

Modified: llvm/trunk/test/tools/llvm-config/libs.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-config/libs.test?rev=289605&r1=289604&r2=289605&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-config/libs.test (original)
+++ llvm/trunk/test/tools/llvm-config/libs.test Tue Dec 13 16:17:59 2016
@@ -1,4 +1,4 @@
-RUN: llvm-config --libs core support 2>&1 | FileCheck %s
+RUN: llvm-config --ignore-libllvm --libs core support 2>&1 | FileCheck %s
 CHECK: LLVMCore
 CHECK: LLVMSupport
 CHECK-NOT: error

Modified: llvm/trunk/tools/llvm-config/llvm-config.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/llvm-config.cpp?rev=289605&r1=289604&r2=289605&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/llvm-config.cpp (original)
+++ llvm/trunk/tools/llvm-config/llvm-config.cpp Tue Dec 13 16:17:59 2016
@@ -215,6 +215,7 @@ Options:\n\
   --shared-mode     Print how the provided components can be collectively linked (`shared` or `static`).\n\
   --link-shared     Link the components as shared libraries.\n\
   --link-static     Link the component libraries statically.\n\
+  --ignore-libllvm  Ignore libLLVM and link component libraries instead.\n\
 Typical components:\n\
   all               All LLVM libraries (default).\n\
   engine            Either a native JIT or a bitcode interpreter.\n";
@@ -553,6 +554,8 @@ int main(int argc, char **argv) {
         LinkMode = LinkModeShared;
       } else if (Arg == "--link-static") {
         LinkMode = LinkModeStatic;
+      } else if (Arg == "--ignore-libllvm") {
+        LinkDyLib = false;
       } else {
         usage();
       }




More information about the llvm-commits mailing list