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

XCTest build_script.py should build debug/release depending on Swift build script params

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: XCTest
    • Labels:

      Description

      swift-corelibs-xctest's build_script.py is able to build the project in either --debug or --release mode: https://github.com/apple/swift-corelibs-xctest/blob/360a13aa99cd15766cda839b28eeeb3034e63715/build_script.py#L236-L249

      The Swift build script, utils/build-script, also takes parameters to determine the build mode:
      https://github.com/apple/swift/blob/e8eba770d58ce512046951b0647941194987525e/utils/build-script#L358-L367

      Swift has many build modes: Debug, Release, Release+Assert, etc. This build mode is never reflected in the XCTest build mode, however: https://github.com/apple/swift/blob/e8eba770d58ce512046951b0647941194987525e/utils/build-script-impl#L1937-L1942

      It should be! XCTest should be built in release mode (passed the --release flag) when Swift is being built in release mode. It should be built in debug mode when Swift is built in debug mode.

      (It might also be worth looking into the other Swift build modes, such as when assertions are turned on, and determine whether we should reflect that in how XCTest is built. But that's outside the scope of this task.)

        Attachments

          Activity

            People

            Assignee:
            jamal Jamal Rogers
            Reporter:
            modocache Brian Ivan Gesiak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: