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

Package manager cache issues switching code coverage on and off

    XMLWordPrintable

    Details

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

      Description

      Going back and forth between builds with and without `--enable-code-coverage` causes linker failures.

      Easy to reproduce with Swift 5.0.1 (macOS):

      mkdir Demonstrate
      cd Demonstrate
      swift package init
      swift test --enable-code-coverage
      swift test --generate-linuxmain
      

      Output:

      Undefined symbols for architecture x86_64:
        "___llvm_profile_runtime", referenced from:
            ___llvm_profile_runtime_user in XCTestManifests.swift.o
           (maybe you meant: ___llvm_profile_runtime_user)
      ld: symbol(s) not found for architecture x86_64
      <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            SDGGiesbrecht Jeremy David Giesbrecht
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: