Uploaded image for project: 'Swift'
  1. Swift
  2. SR-14109

Not possible to build cross-platform Swift libraries with optional assembly code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Package Manager
    • Labels:
      None

      Description

      Derived from SwiftNIO SSL issue #251.

      Some Apple platforms require app submission using bitcode, a non-final representation of the binary artefact. Bitcode submissions have a number of constraints that don't apply to binary submission. One of these is that they must not contain any raw assembly code, either as blocks or as complete files. Importantly, the compiler will reject the mere presence of any .s/.S files in the build tree, even if those files are empty and contribute no object data to the build.

      SwiftPM supports mixed C/assembly targets, and SwiftNIO SSL uses this support. This mostly works great, unless someone wants to ship a watchOS app using SwiftNIO SSL (a supported platform). Here the mixed C/assembly files cause a fatal build error.

      We need a way to exclude assembly files using SwiftPM depending on the deployment target that does not rely on kicking those files out to a separate target.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            lukasa Cory Benfield
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: