[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

Carlo Cabrera via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 20 10:51:59 PST 2024


================
@@ -1018,13 +1018,19 @@ bool Darwin::hasBlocksRuntime() const {
   }
 }
 
-void Darwin::AddCudaIncludeArgs(const ArgList &DriverArgs,
-                                ArgStringList &CC1Args) const {
+void MachO::AddCudaIncludeArgs(const ArgList &DriverArgs,
+                               ArgStringList &CC1Args) const {
+  if (!isTargetAppleBased())
+    return ToolChain::AddCudaIncludeArgs(DriverArgs, CC1Args);
----------------
carlocab wrote:

> But that's a good point, it would probably be cleaner to make an AppleMachO toolchain in between the existing MachO and Darwin ones

This does seem cleaner to me, but I can see how someone else might prefer the opposite -- feel free to leave the `isTargetAppleBased` checks in if someone else pushes back on an `AppleMachO` toolchain.

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


More information about the cfe-commits mailing list