[Lldb-commits] [lldb] r344628 - For a built & test bot, add an environment variable PLATFORM_SDK_DIRECTORY,

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 16 10:31:33 PDT 2018


Author: jmolenda
Date: Tue Oct 16 10:31:33 2018
New Revision: 344628

URL: http://llvm.org/viewvc/llvm-project?rev=344628&view=rev
Log:
For a built & test bot, add an environment variable PLATFORM_SDK_DIRECTORY,
which PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded
which examine for any additional SDK directories when it is
constructing its list.

<rdar://problem/42984340>
<rdar://problem/41351223>


Modified:
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp?rev=344628&r1=344627&r2=344628&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp Tue Oct 16 10:31:33 2018
@@ -231,6 +231,29 @@ bool PlatformRemoteDarwinDevice::UpdateS
           }
         }
       }
+
+      const char *addtional_platform_dirs = getenv("PLATFORM_SDK_DIRECTORY");
+      if (addtional_platform_dirs) {
+        SDKDirectoryInfoCollection env_var_sdk_directory_infos;
+        FileSpec::EnumerateDirectory(addtional_platform_dirs, find_directories,
+                                     find_files, find_other,
+                                     GetContainedFilesIntoVectorOfStringsCallback,
+                                     &env_var_sdk_directory_infos);
+        FileSpec sdk_symbols_symlink_fspec;
+        for (const auto &sdk_directory_info : env_var_sdk_directory_infos) {
+          sdk_symbols_symlink_fspec = sdk_directory_info.directory;
+          sdk_symbols_symlink_fspec.AppendPathComponent("Symbols");
+          if (sdk_symbols_symlink_fspec.Exists()) {
+            m_sdk_directory_infos.push_back(sdk_directory_info);
+            if (log) {
+              log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
+                          "added env var SDK directory %s",
+                          sdk_symbols_symlink_fspec.GetPath().c_str());
+            }
+          }
+        }
+      }
+
     }
   }
   return !m_sdk_directory_infos.empty();




More information about the lldb-commits mailing list