RT, it seems Swift treats the two differently (and bundled library using unknown
cannot be used when the target vendor is pc
), while clang
supports both.
Should we work out a way to support both, or is the vendor special especially in Swift?
RT, it seems Swift treats the two differently (and bundled library using unknown
cannot be used when the target vendor is pc
), while clang
supports both.
Should we work out a way to support both, or is the vendor special especially in Swift?
IME, clang largely ignores the vendor, while the Swift compiler explicitly checks for it, as the module files use it:
> ls -l swift-5.6.3-RELEASE-ubuntu20.04/usr/lib/swift/linux/Swift.swiftmodule/
total 19940
-rw-r--r-- 1 butta butta 3804072 Aug 26 07:38 x86_64-unknown-linux-gnu.swiftdoc
-rw-r--r-- 1 butta butta 1851759 Aug 26 07:38 x86_64-unknown-linux-gnu.swiftinterface
-rw-r--r-- 1 butta butta 14755396 Aug 26 07:38 x86_64-unknown-linux-gnu.swiftmodule
Yes, so the question could be — if we can ignore vendor, or, to preserve maximum explicitness, provide a fallback strategy for vendor matching.
I should also note that Swift on Windows diverges with LLVM and Rust on default vendor. Stand-alone LLVM package defaults to pc
while Swift Clang defaults to unknown
. This could be some problem for FFI users.