Skip to content

[Windows] Prepare for swift-foundation in the toolchain #74127

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

Merged

Conversation

jmschonfeld
Copy link
Contributor

This PR is the same effective change as #74019 but for the Windows build via build.ps1

@jmschonfeld jmschonfeld requested a review from compnerd June 4, 2024 21:55
@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

This seems relatively safe. I assume that the linkage here will be static and no DSOs (DLLs) need to be packaged up into the installer?

@compnerd
Copy link
Member

compnerd commented Jun 4, 2024

@swift-ci please build toolchain Windows platform

@jmschonfeld
Copy link
Contributor Author

This seems relatively safe. I assume that the linkage here will be static and no DSOs (DLLs) need to be packaged up into the installer?

This change itself is basically a no-op, Foundation doesn't use these settings yet. Eventually, the list of shared libraries we install into the toolchain will expand from Foundation/FoundationNetworking/FoundationXML to also include FoundationEssentials/FoundationInternationalization/_FoundationICU. Is there anything else we need to do to accommodate these extra shared libraries in the build script here?

@jmschonfeld
Copy link
Contributor Author

Error: Cannot process argument transformation on parameter 'Project'. Cannot convert value "SwiftSyntax" to type "TargetComponent". Error: "Unable to match the identifier name SwiftSyntax to a valid enumerator name. Specify one of the following enumerator names and try again:
LLVM, Runtime, Dispatch, Foundation, XCTest"

@compnerd is there a better way I should be getting the SwiftSyntax directory from the early swift syntax build? I see other places in this file use Get-HostProjectCMakeModules Compilers but I'm not sure if that's available at this phase of the build process, should I be using that instead?

@compnerd
Copy link
Member

I think that you need to build swift-syntax for the target - right now we only build swift-syntax for the host and there is no guarantee that the host and target are the same (we do support cross-compilation for the ARM64 distribution).

@jmschonfeld
Copy link
Contributor Author

I think that you need to build swift-syntax for the target - right now we only build swift-syntax for the host and there is no guarantee that the host and target are the same (we do support cross-compilation for the ARM64 distribution).

I think that should be fine - we only need swift-syntax for our macro which only gets built for the host anyways, right?

@jmschonfeld
Copy link
Contributor Author

Oh I see: Get-TargetProjectBinaryCache - we probably don't want the target one there got it ok yeah that should probably change

@jmschonfeld
Copy link
Contributor Author

@swift-ci please build toolchain Windows platform

@jmschonfeld
Copy link
Contributor Author

@swift-ci please smoke test

@jmschonfeld
Copy link
Contributor Author

@compnerd it looks like the latest changes passed tests/toolchain builds - is this ok to go ahead and merge and cherry pick to release/6.0 to help unblock the swift-foundation work?

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

I think that there is a small change that we should do to compnerd/swift-build to ensure that the other repositories are checked out with repo, but LGTM.

@jmschonfeld
Copy link
Contributor Author

I think that there is a small change that we should do to compnerd/swift-build to ensure that the other repositories are checked out with repo, but LGTM.

Sounds good, LMK if there's anything I can help with on that front - looks like you have swift-foundation and swift-foundation-icu added there now which looks good. Once #73654 lands we'll likely need to bump swift-collections to the 1.1.1 revision there too since swift-foundation depends on swift-collections >=1.1.1

@jmschonfeld jmschonfeld merged commit 3dd4198 into swiftlang:main Jun 12, 2024
4 checks passed
jmschonfeld added a commit to jmschonfeld/swift that referenced this pull request Jun 12, 2024
)

* [Windows] Prepare for swift-foundation in the toolchain

* Update SwiftSyntax directory
@jmschonfeld jmschonfeld deleted the swift-foundation-toolchain-windows branch June 12, 2024 17:23
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