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

Flag to statically link Swift standard library

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:
    • Environment:

      swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a

      Description

      If I build an executable with swiftc:

      $ swiftc test.swift
      

      Then I find out the Swift standard library was dynamically linked:

      $ otool -L test
      @rpath/libswiftCore.dylib (compatibility version 0.0.0, current version 0.0.0)
      

      However, the binary distributions also have a static version that I didn't use:

      /Library/Developer/Toolchains/swift-latest.xctoolchain//usr/lib/swift_static/macosx/libswiftCore.a
      

      I want to pass e.g. -static-stdlib to swiftc to compile a program that is statically linked with the Swift standard library.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                drewcrawford Drew Crawford
                Reporter:
                drewcrawford Drew Crawford
              • Votes:
                6 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: