Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlueSSLService cannot be cross-compiled #75

Open
weissi opened this issue May 4, 2019 · 1 comment
Open

BlueSSLService cannot be cross-compiled #75

weissi opened this issue May 4, 2019 · 1 comment

Comments

@weissi
Copy link

weissi commented May 4, 2019

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.

@weissi
Copy link
Author

weissi commented May 4, 2019

I prepared a PR for that: swiftlang/swift-package-manager#2114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant