-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix package
access modifier in XCBuild support
#7258
Conversation
`package` access modifier was previously not supported in `swift build --build-system xcode`. This causes build issues when attempting to produce Universal binaries for SwiftPM, for example in this job https://ci.swift.org/job/swift-PR-source-compat-suite-debug-macos/1297/consoleFull. The reason was that `-package-name` option was not added to `OTHER_SWIFT_FLAGS` in `PIFBuilder.swift`. Additionally, in llbuild support code we were shelling out to Swift Driver for every target to check whether `-package-name` is supported. Now with `-package-name` options calculation generalized across build systems, Swift Driver checks are done once per `BuildParameters` initialization, which reduces excessive shelling for llbuild. Resolves rdar://120925895.
@swift-ci test |
@swift-ci test |
@swift-ci test |
@swift-ci test windows |
I don't think that's true since #7057? There's a static cache of computed flags, isn't there? |
Sources/Build/BuildDescription/SwiftTargetBuildDescription.swift
Outdated
Show resolved
Hide resolved
Fair enough. But we'd have to migrate away from |
@swift-ci test |
@swift-ci test windows |
@swift-ci test |
@swift-ci test windows |
@swift-ci test |
@swift-ci test windows |
XCBuildSupport is not available on non-Darwin platforms, especially Windows, where we have to have full CMake support at the moment. Maintaining XCBuildSupport in these unsupported configurations adds unnecessary overhead, especially in cases like #7258, where we have to add new dependencies only when `XCBuildSupport` is available. We should exclude from CMake builds to reduce this maintenance overhead.
XCBuildSupport is not available on non-Darwin platforms, especially Windows, where we have to have full CMake support at the moment. Maintaining XCBuildSupport in these unsupported configurations adds unnecessary overhead, especially in cases like #7258, where we have to add new dependencies only when `XCBuildSupport` is available. We should exclude from CMake builds to reduce this maintenance overhead.
…xd/fix-xcbuild-package-name # Conflicts: # Sources/XCBuildSupport/CMakeLists.txt
@swift-ci test |
@swift-ci test windows |
@swift-ci test |
@swift-ci test windows |
@swift-ci test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
This was added to the `Package.swift` in swiftlang#7258 but skipped in the CMake because swiftlang#7358 excluded XCBuildSupport as a CMake target. But that's reverted here, so we need to add the dependency in.
…7371) This reverts commit 5287062, which causes macOS toolchain builds to fail with: ``` main/main.swift:345: Fatal error: SwiftPM was built without XCBuild support ``` Also adds the DriverSupport dependency to XCBuildSupport, which was skipped in #7258 because #7358 was merged (but we're reverting that).
XCBuildSupport is not available on non-Darwin platforms, especially Windows, where we have to have full CMake support at the moment. Maintaining XCBuildSupport in these unsupported configurations adds unnecessary overhead, especially in cases like swiftlang#7258, where we have to add new dependencies only when `XCBuildSupport` is available. We should exclude from CMake builds to reduce this maintenance overhead.
`package` access modifier was previously not supported in `swift build --build-system xcode`. This causes build issues when attempting to produce Universal binaries for SwiftPM, for example in this job https://ci.swift.org/job/swift-PR-source-compat-suite-debug-macos/1297/consoleFull. The reason was that `-package-name` option was not added to `OTHER_SWIFT_FLAGS` in `PIFBuilder.swift`. Additionally, in llbuild support code we were shelling out to Swift Driver for every target to check whether `-package-name` is supported. Now with `-package-name` options calculation generalized across build systems, Swift Driver checks are done once per `BuildParameters` initialization, which reduces excessive shelling for llbuild. Resolves rdar://120925895.
…7358)" (swiftlang#7371) This reverts commit 5287062, which causes macOS toolchain builds to fail with: ``` main/main.swift:345: Fatal error: SwiftPM was built without XCBuild support ``` Also adds the DriverSupport dependency to XCBuildSupport, which was skipped in swiftlang#7258 because swiftlang#7358 was merged (but we're reverting that).
XCBuildSupport is not available on non-Darwin platforms, especially Windows, where we have to have full CMake support at the moment. Maintaining XCBuildSupport in these unsupported configurations adds unnecessary overhead, especially in cases like swiftlang#7258, where we have to add new dependencies only when `XCBuildSupport` is available. We should exclude from CMake builds to reduce this maintenance overhead.
`package` access modifier was previously not supported in `swift build --build-system xcode`. This causes build issues when attempting to produce Universal binaries for SwiftPM, for example in this job https://ci.swift.org/job/swift-PR-source-compat-suite-debug-macos/1297/consoleFull. The reason was that `-package-name` option was not added to `OTHER_SWIFT_FLAGS` in `PIFBuilder.swift`. Additionally, in llbuild support code we were shelling out to Swift Driver for every target to check whether `-package-name` is supported. Now with `-package-name` options calculation generalized across build systems, Swift Driver checks are done once per `BuildParameters` initialization, which reduces excessive shelling for llbuild. Resolves rdar://120925895.
…7358)" (swiftlang#7371) This reverts commit 5287062, which causes macOS toolchain builds to fail with: ``` main/main.swift:345: Fatal error: SwiftPM was built without XCBuild support ``` Also adds the DriverSupport dependency to XCBuildSupport, which was skipped in swiftlang#7258 because swiftlang#7358 was merged (but we're reverting that).
package
access modifier was previously not supported inswift build --build-system xcode
. This causes build issues when attempting to produce Universal binaries for SwiftPM, for example in this job https://ci.swift.org/job/swift-PR-source-compat-suite-debug-macos/1297/consoleFull.The reason was that
-package-name
option was not added toOTHER_SWIFT_FLAGS
inPIFBuilder.swift
. Additionally, in llbuild support code we were shelling out to Swift Driver for every target to check whether-package-name
is supported. Now with-package-name
options calculation generalized across build systems, Swift Driver checks are done once perBuildParameters
initialization, which reduces excessive shelling for llbuild.Resolves rdar://120925895.