Skip to content

BlueSSLService cannot be cross-compiled #75

@weissi

Description

@weissi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions