[clang] [clang][driver][darwin] Prefer DarwinSDKInfo for platform identification and compatibility over the -isysroot path (PR #176541)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 17 00:19:46 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions c,h,cpp -- clang/include/clang/Basic/DarwinSDKInfo.h clang/lib/Basic/DarwinSDKInfo.cpp clang/lib/Driver/ToolChains/Darwin.cpp clang/lib/Driver/ToolChains/Darwin.h clang/test/Driver/darwin-sdk-with-prefix.c clang/test/Driver/xros-driver-requires-darwin-host.c --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index d512acea5..dbe17bf80 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -1788,7 +1788,7 @@ struct DarwinPlatform {
 
   /// Returns true if the simulator environment can be inferred from the arch.
   bool canInferSimulatorFromArch() const { return InferSimulatorFromArch; }
-    
+
   DarwinSDKInfo::SDKPlatformInfo getPlatformInfo() const {
     llvm::Triple::OSType OS = getOSFromPlatform(Platform);
     llvm::Triple::EnvironmentType EnvironmentType =

``````````

</details>


https://github.com/llvm/llvm-project/pull/176541


More information about the cfe-commits mailing list