]> granicus.if.org Git - llvm/commitdiff
[llvm-config] Add --ignore-libllvm
authorChris Bieneman <beanz@apple.com>
Tue, 13 Dec 2016 22:17:59 +0000 (22:17 +0000)
committerChris Bieneman <beanz@apple.com>
Tue, 13 Dec 2016 22:17:59 +0000 (22:17 +0000)
This flag forces off linking libLLVM. This should resolve some issues reported on llvm-commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289605 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-config/libs.test
tools/llvm-config/llvm-config.cpp

index 39b8834e246185c678842de4b612dc79e0a7c45c..25efa8ce7c05bcbcab3fa4568b02a2e6586892a9 100644 (file)
@@ -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
index 4b4a3ea97ab17ebc40f4cbd2c3b650eb5dd1ae46..6fdc304dbf1b6a9f632fafafaa8e0cb7beb61b47 100644 (file)
@@ -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();
       }