Skip to content

[Xcode] Use the Legacy Build System to use Swift 5 mode on Xcode 10 #1826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Jan 16, 2019

This works around the Swift version validation by the New Build System. See the following for the details:

Supersedes #1818.

@ikesyo
Copy link
Member Author

ikesyo commented Jan 16, 2019

@swift-ci Please test

@@ -2739,6 +2739,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT DEBUG";
SWIFT_VERSION = 5.0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now set at the project level, not at per-target level.

@parkera
Copy link
Contributor

parkera commented Jan 17, 2019

Hm, do we want to switch to 5.0 mode yet?

@ikesyo
Copy link
Member Author

ikesyo commented Jan 17, 2019

@ikesyo
Copy link
Member Author

ikesyo commented Jan 17, 2019

11:33:55 + /Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/swift-corelibs-xctest/build_script.py --swiftc=/Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc --build-dir=/Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/xctest-macosx-x86_64 --foundation-build-dir=/Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/foundation-macosx-x86_64 --swift-build-dir=/Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/swift-macosx-x86_64 --release
11:33:56 Build settings from command line:
11:33:56     INDEX_ENABLE_DATA_STORE = NO
11:33:56     OBJROOT = /Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/xctest-macosx-x86_64
11:33:56     SWIFT_EXEC = /Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc
11:33:56     SWIFT_LINK_OBJC_RUNTIME = YES
11:33:56     SYMROOT = /Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/xctest-macosx-x86_64
11:33:56     TOOLCHAINS = default
11:33:56 
11:33:57 note: Using new build system

Hm the Xcode project of swift-corelibs-xctest should also be updated or we should have a condition:

#if swift(>=5.0)
    guard let parsingTests = testRoot[kURLTestParsingTestsKey] as? [Any] else {
        XCTFail("Unable to create the parsingTests dictionary")
        return nil
    }
#else
    guard let parsingTests = testRoot?[kURLTestParsingTestsKey] as? [Any] else {
        XCTFail("Unable to create the parsingTests dictionary")
        return nil
    }
#endif

@ikesyo
Copy link
Member Author

ikesyo commented Jan 17, 2019

Closing this in favor of #1829.

@ikesyo ikesyo closed this Jan 17, 2019
@ikesyo ikesyo deleted the xcode-swift-5.0 branch January 19, 2019 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants