-
Notifications
You must be signed in to change notification settings - Fork 50
Description
BlueSSLService uses #if os(...) in the Package.swift file which prevents it from being cross-compiled because that makes the assumption that the Package.swift is executed on the same OS as the resulting binaries will be which isn't true for cross-compilation.
I know this is to make it compatible with macOS without installing Open/LibreSSL using homebrew on macOS and I don't know if there's a full solution to get it to properly work with SwiftPM. There might be a way using conditional imports in the .swift files rather than in the Package.swift but I'm not 100% sure.
The other option is that we do something hacky and we change the
#if os(Linux)
to something like
#if CROSS_COMPILATION_TARGET_LINUX || os(Linux)
and in the cross compilation toolchain builder script we'd just add
-DCROSS_COMPILATION_TARGET_LINUX
to the extra-swiftc-flags list.