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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to