[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe3b0414b0ea3: [lldb] Change the xcrun (fallback) logic in GetXcodeSDK (authored by JDevlieghere). Herald added a project: LLDB. Changed prior to commit:

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-06 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments. Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:378 + auto xcrun = [](std::string sdk, + std::string developer_dir = "") -> std::string { +std::string xcrun_cmd = "xcrun --show-sdk-path --sdk " + sdk;

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 296553. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88866/new/ https://reviews.llvm.org/D88866 Files: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm Index: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-06 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. Apart from a cosmetic detail (inline) this LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88866/new/ https://reviews.llvm.org/D88866

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-06 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments. Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:423 +if (path.RemoveLastPathComponent()) { + developer_dir = path.GetPath(); + std::string sdk = xcrun(developer_dir, sdk_name); Can you use a

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 296552. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88866/new/ https://reviews.llvm.org/D88866 Files: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm Index: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-06 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments. Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:405 + auto find_sdk = [&](std::string sdk_name) -> std::string { +std::string developer_dir = GetEnvDeveloperDir(); +if (developer_dir.empty()) perhaps add ```

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-05 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D88866#2313371 , @aprantl wrote: > So this is adding a fallback that ignores DEVELOPER_DIR if it is set, but > doesn't exist? Is that really desirable, or am I misunderstanding the patch? > I would expect LLDB to fail

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. So this is adding a fallback that ignores DEVELOPER_DIR if it is set, but doesn't exist? Is that really desirable, or am I misunderstanding the patch? I would expect LLDB to fail hard if the DEVELOPER_DIR in the environment is wrong and not silently ignore it...

[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

2020-10-05 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added a reviewer: aprantl. JDevlieghere requested review of this revision. If we tried getting the SDK from `xcrun` with the developer dir set and it failed, try without the developer dir. https://reviews.llvm.org/D88866 Files: