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

Include bitcode in Xcode toolchain libraries

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: None
    • Labels:

      Description

      Env:
      macOS 10.14.6
      Xcode 11 beta 6

      Xcode toolchain recently added some new Swift 5.0 compatibility libraries (noticed in Xcode 11 beta 6 as well as open source toolchain):

      • libswiftCompatibility50.a
      • libswiftCompatibilityDynamicReplacements.a

      Those libraries are included for all platforms, not only macOS, what is their goal? Is it to provide compatibility for e.g. dynamic replacements on older OSes?

      This is problematic for testing bitcode on older macOS releases than 10.15 because Swift compiler apparently tries to always link those libraries, even when Swift 5.1 features are not used.
      Running `swiftc -embed-bitcode empty.swift` with empty Swift source files fails to include bitcode because the listed libraries do not have it.

      ld: warning: all bitcode will be dropped because '/Applications/Xcode_11.0_b6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCompatibility50.a(ProtocolConformance.cpp.o)' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
      ld: warning: all bitcode will be dropped because '/Applications/Xcode_11.0_b6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCompatibility50.a(Overrides.cpp.o)' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
      ld: warning: all bitcode will be dropped because '/Applications/Xcode_11.0_b6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCompatibilityDynamicReplacements.a(DynamicReplaceable.cpp.o)' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            osjup Damian Malarczyk
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: