[clang] [llvm] [HIP][MacOS] Mach-O support and Darwin toolchain fixes (PR #183991)

Paulius Velesko via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 1 06:57:30 PDT 2026


================
@@ -3390,6 +3429,12 @@ void Darwin::addClangTargetOptions(
 
   MachO::addClangTargetOptions(DriverArgs, CC1Args, DeviceOffloadKind);
 
+  // When compiling device code (e.g. SPIR-V for HIP), skip host-specific
+  // flags like -faligned-alloc-unavailable and -fno-sized-deallocation
+  // that depend on the host OS version and are irrelevant to device code.
+  if (DeviceOffloadKind != Action::OFK_None)
----------------
pvelesko wrote:

just device compilations 

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


More information about the cfe-commits mailing list