[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

Caleb Zulawski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 21:02:18 PDT 2022


calebzulawski added a comment.

In D136315#3870829 <https://reviews.llvm.org/D136315#3870829>, @ldionne wrote:

> Thanks for picking this up! I looked at my local changes and I had started modifying `inferDeploymentTargetFromSDK`. I had left the comment:
>
>   /// TODO: We should only infer it if the SDK was provided with SDKROOT or -isysroot.
>   ///       If we inferred the SDK with xcrun, it doesn't make sense to infer the
>   ///       deployment target because <REASONS>
>
> I don't remember what I was thinking at the time, but I encourage you to pause for a minute and think about it. I can't think of the reason anymore. If you cant' either, maybe just disregard my comment entirely.

I took another look at this, and I think it makes sense to determine the deployment target regardless.  The target platform shouldn't change since the platform is passed to `xcrun`, but there is still value in determining the default deployment version.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136315/new/

https://reviews.llvm.org/D136315



More information about the cfe-commits mailing list