[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:43:42 PST 2023


calebzulawski added inline comments.


================
Comment at: clang/test/Driver/darwin-sdk-detect.c:1
+// REQUIRES: system-darwin
+
----------------
steven_wu wrote:
> This test won't work in all conditions. Like I said, you requires to have a Xcode/CommandLineTools installation to make `xcrun` work.
> 
> Maybe you can make the argument that you are compiling clang, so you must have one of those installed, but CommandLineTools definitely doesn't have iOS SDK for the second test.
True, maybe we can just remove the iOS test if you think that's sufficient.  Otherwise, is there any way to make the have the test check that either the `-isysroot` flag is present with that pattern, or not present at all?  I'm not too familiar with llvm-lit, I just browsed a few other examples before writing this.


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