[llvm-config] Fixing one check where shared libs implied dylib
authorChris Bieneman <beanz@apple.com>
Tue, 13 Dec 2016 23:08:52 +0000 (23:08 +0000)
committerChris Bieneman <beanz@apple.com>
Tue, 13 Dec 2016 23:08:52 +0000 (23:08 +0000)
We shouldn't print the dylib if LinkDylib is false.

llvm-svn: 289609

llvm/tools/llvm-config/llvm-config.cpp

index d6e6781..d780094 100644 (file)
@@ -598,7 +598,7 @@ int main(int argc, char **argv) {
     if (!MissingLibs.empty()) {
       switch (LinkMode) {
       case LinkModeShared:
-        if (DyLibExists && !BuiltSharedLibs)
+        if (LinkDyLib && !BuiltSharedLibs)
           break;
         // Using component shared libraries.
         for (auto &Lib : MissingLibs)
@@ -674,7 +674,7 @@ int main(int argc, char **argv) {
         }
       };
 
-      if (LinkMode == LinkModeShared && !BuiltSharedLibs) {
+      if (LinkMode == LinkModeShared && LinkDyLib) {
         PrintForLib(DyLibName);
       } else {
         for (unsigned i = 0, e = RequiredLibs.size(); i != e; ++i) {