================ @@ -144,16 +150,22 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) { #endif } else { // Find the bin path relative to the lib path where the cmake-based - // OS X .dylib lives. This is not going to work if the bin and lib - // dir are not both in the same dir. + // OS X .dylib lives. We try looking first at a possible sibling `bin` + // directory, and then at the `lib` directory itself. // - // It is not going to work to do it by the executable path either, + // It is not going to work to do it by the executable path, // as in the case of a python script, the executable is python, not // the lldb driver. + FileSpec support_dir_spec_lib(raw_path); raw_path.append("/../bin"); - FileSpec support_dir_spec(raw_path); - FileSystem::Instance().Resolve(support_dir_spec); - if (!FileSystem::Instance().IsDirectory(support_dir_spec)) { + FileSpec support_dir_spec_bin(raw_path); + FileSpec support_dir_spec; ---------------- JDevlieghere wrote:
You can simplify this slightly without modifying `raw_path`: ``` FileSpec support_dir_spec_lib(raw_path); FileSpec support_dir_spec_bin = support_dir_spec_lib.CopyByAppendingPathComponent("/../bin"); FileSpec support_dir_spec; ``` https://github.com/llvm/llvm-project/pull/103458 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits