Skip to content
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

[6.0] Add cross-compiling support for the windows toolchain #73920

Merged

Conversation

shahmishal
Copy link
Member

@shahmishal shahmishal commented May 27, 2024

Co-authrored with @compnerd

(cherry picked from commit f6ab729)

Explanation: Bring cross-compiling support for Windows arm64 to release/6.0 branch
Scope: Update the utils/build.ps1 script to include changes required to cross compile for arm64.
Original PRs: #71584, #73058, #73494, #73733
Risk: Low
Testing: Verify the Windows toolchain for arm64 builds
Reviewer: @compnerd

Co-authrored with @compnerd

(cherry picked from commit f6ab729)
@shahmishal shahmishal changed the title Add cross-compiling support for the windows toolchain [6.0] Add cross-compiling support for the windows toolchain May 27, 2024
@shahmishal
Copy link
Member Author

@swift-ci test

Future work to enable Android SDKs requires fetching additional
dependencies (e.g. Android NDK). Refactor the fetch dependencies method
to allow us to share the download logic rather than replicating it for
each piece. This will also allow us to fetch the Python dependency for
the ARM64 toolchain cross-compilation.

(cherry picked from commit 726bf5c)
@shahmishal
Copy link
Member Author

@swift-ci test windows

@shahmishal
Copy link
Member Author

@swift-ci test macOS

@shahmishal
Copy link
Member Author

@swift-ci test Linux

@shahmishal
Copy link
Member Author

git log --oneline --no-merges origin/release/6.0..origin/main -- utils/build.ps1

Need to cherry-pick following commits to enable arm64 support on Windows for release/6.0 branch:

  • eb6cd28 Update utils/build.ps1
  • 5440760 utils: tweak the path before using a Swift toolchain
  • 421c0cf utils: use cmark gfm for the build when running the compiler

@compnerd Do we need any of the following commits in release/6.0 and to support arm64?

  • 4222205 utils: do not install testable corelibs builds
  • b746145 utils: enable curl websockets support when building with build.ps1
  • 94c10c2 [Build] Pass in swift-syntax to SwiftPM
  • 45f5cff Remove unnecessary /usr/include/CSystem directory to avoid build errors
  • 1bc7232 utils: build makeOption when building with build.ps1

@rintaro Should we pull this into release/6.0?

  • 1a06b94 [Windows] Build SwiftCompilerPlugin module when testing swift

Both of these commits were made due to Android support:

  • dd5d6fa utils: update curl to 8.5.0
  • 9944af3 update_checkout: update zlib to 1.3.1

compnerd added 3 commits May 27, 2024 00:58
When using the just built compiler, we need to use the build CMark
runtime as it is executing on the build. This used to work when host and
build were guaranteed to be identical (i.e. no cross-compilation). This
is now needed to support cross-compiling ARM64.

(cherry picked from commit 421c0cf)
We need to tweak the path before we can use the pinned or the just built
toolchain. This becomes a problem when trying to cross-compile the
toolchain.

(cherry picked from commit 5440760)
Co-authored-by: Mishal Shah <[email protected]>
(cherry picked from commit eb6cd28)
@shahmishal
Copy link
Member Author

@swift-ci test

@compnerd compnerd self-requested a review May 27, 2024 14:59
@shahmishal shahmishal marked this pull request as ready for review May 27, 2024 21:57
@shahmishal shahmishal requested a review from a team as a code owner May 27, 2024 21:57
@shahmishal shahmishal merged commit c6b1158 into release/6.0 May 28, 2024
5 checks passed
@shahmishal shahmishal deleted the cherry-pick-windows-cross-compile-arm64-support branch May 28, 2024 04: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.

4 participants