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

Usage of .windows in package manifest results in a crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Component/s: Package Manager
    • Labels:
      None
    • Environment:

      macOS 10.15.7

      Xcode 12.1 toolchain

      Description

      I have the following Package.swift:

      // swift-tools-version:5.3
      
      import PackageDescription
      
      let package = Package(
          name: "spm-windows",
          products: [
              .library(name: "spm-windows", targets: ["spm-windows"]),
          ],
          targets: [
              .target(
                  name: "spm-windows",
                  swiftSettings: [.define("Windows", .when(platforms: [.windows]))]
              ),
              .testTarget(
                  name: "spm-windowsTests",
                  dependencies: ["spm-windows"]
              ),
          ]
      )
      
      

      When running swift build, I get this:

      [1]    51267 illegal hardware instruction  swift build
      

      See the attached archive.

        Attachments

          Activity

            People

            Assignee:
            neonichu Boris Buegling
            Reporter:
            broadway_lamb Sergej Jaskiewicz
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: