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

Ian Anderson via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 11:29:16 PST 2025


ian-twilightcoder wrote:

> > as Swift expects all MachO targets to have that defined.
> 
> can you elaborate on that expectation?

[shims/Visibility.h](https://github.com/swiftlang/swift/blob/main/stdlib/public/SwiftShims/swift/shims/Visibility.h#L137) uses `__MACH__` to figure out how to configure the visibility attributes. It's taking `__MACH__` to mean Mach-O and not dyld. Without that, apple-none-macho falls down to Windows declspec which is an error. libc++'s [__configuration/platform.h](https://github.com/llvm/llvm-project/blob/main/libcxx/include/__configuration/platform.h#L21) takes the same meaning. usr/include/TargetConditionals.h also equates `__MACH__` to Mach-O.

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


More information about the llvm-commits mailing list