[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 Jan 20 11:40:07 PST 2023


calebzulawski added a comment.

In my situation, at least, I am the vendor of the toolchain and my configuration file contains `--sysroot=<CFGDIR>/../path/to/sysroot` with a known relative path to where the sysroot is distributed.  Apple is unique in this situation, since I am not distributing the sysroot, so there is no equivalent to using the `<CFGDIR>` variable.  There is no way to invoke `xcrun` or set `SDKROOT` from config files, only pass flags.

It is true that the build system could do it, but I think it's reasonable for the driver to make a guess when not provided.  I don't think it's all that different than detection of libstdc++ from GCC installs.


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