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

Steven Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 20 09:38:32 PST 2023


steven_wu added a comment.

In D136315#4067205 <https://reviews.llvm.org/D136315#4067205>, @calebzulawski wrote:

> One thing to throw into the mix: Apple's clang has a default sysroot configured, so with the default system compiler, there is no way to replicate this "build without a sysroot" scenario as far as I can tell.  For the system compiler, I believe this behavior is a strict improvement.

No, apple's clang doesn't have a default sysroot. When you run `/usr/bin/clang`, which is a shim that calls `xcrun`, it finds the clang in your toolchain and invokes it with `SDKROOT` environment variable. That is the behavior of the shim, not the behavior of clang.


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