title: Swift Package manager : static build failing after software updates
body: <p><strong>Problem Description</strong></p>
  
  <p>One project I'm working on isn't building since I updated Xcode.
  Note that I am building the exécutable with swift build (not Xcode).</p>
  
  <p><strong>Details</strong></p>
  
  <p>The command that is failing is :
  <code>swift build -Xswiftc -static-stdlib -Xswiftc -DDEBUG</code></p>
  
  <p>I am trying to make a <em>static</em> build. When just try <code>swift build</code>, it works.</p>
  
  <p><strong>The error</strong></p>
  
  <p>I'm copying the beginning of the error output only (the rest is too long): </p>
  
  <pre><code>ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift_static/macosx'
  ld: warning: Could not find auto-linked library 'swiftFoundation'
  ld: warning: Could not find auto-linked library 'swiftDarwin'
  ld: warning: Could not find auto-linked library 'swiftCoreFoundation'
  ld: warning: Could not find auto-linked library 'swiftIOKit'
  ld: warning: Could not find auto-linked library 'swiftQuartzCore'
  ld: warning: Could not find auto-linked library 'swiftCore'
  ld: warning: Could not find auto-linked library 'swiftCoreGraphics'
  ld: warning: Could not find auto-linked library 'swiftObjectiveC'
  ld: warning: Could not find auto-linked library 'swiftDispatch'
  ld: warning: Could not find auto-linked library 'swiftCoreData'
  ld: warning: Could not find auto-linked library 'swiftSwiftOnoneSupport'
  ld: warning: Could not find auto-linked library 'swiftXPC'
  ld: warning: Could not find auto-linked library 'swiftMetal'
  ld: warning: Could not find auto-linked library 'swiftAppKit'
  ld: warning: Could not find auto-linked library 'swiftCoreImage'
  Undefined symbols for architecture x86_64:
  </code></pre>
  
  <p><strong>Package.swift</strong></p>
  
  <p>Note that I've renamed the project and library names for anonymity.</p>
  
  <pre><code>// swift-tools-version:4.0
  // The swift-tools-version declares the minimum version of Swift required to build this package.
  
  import PackageDescription
  
  let package = Package(
      name: "PROJECT",
      dependencies: [
          // Dependencies declare other packages that this package depends on.
          // .package(url: /* package url */, from: "1.0.0"),
          .package(url: "../Lib1", .branch("master")),
          .package(url: "../Lib2", .branch("master")),
          .package(url: "../Lib3", .branch("master")),
          .package(url: "../Lib4", .branch("master")),
      ],
      targets: [
          // Targets are the basic building blocks of a package. A target can define a module or a test suite.
          // Targets can depend on other targets in this package, and on products in packages which this package depends on.
          .target(
              name: "PROJECT",
              dependencies: ["Lib1", "Lib2", "Lib3", "Lib4"]),
      ]
  )
  </code></pre>
  
  <p><strong>Swift version after update</strong></p>
  
  <p>Running</p>
  
  <pre><code>swift -version
  </code></pre>
  
  <p>in the command line returns : </p>
  
  <pre><code>Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
  Target: x86_64-apple-darwin18.2.0
  </code></pre>