Skip to content

build: Make swift-crypto build on Windows #370

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Steelskin
Copy link

Make swift-crypto build on Windows

Checklist

  • I've run tests to see all new and existing tests pass
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

If you've made changes to gyb files

  • [N/A] I've run .script/generate_boilerplate_files_with_gyb and included updated generated files in a commit of this pull request

Motivation:

Currently, swift-crypto on the main branch does not build on Windows.

Modifications:

  • Add the Windows Arm64 assembly files to the CMake build.
  • Add appropriate CMake options for swift-crypto to build on Windows.

Result:

swift-crypto can be built on Windows from main

Fixes #369

* Add the Windows Arm64 assembly files to the CMake build.
* Add appropriate CMake options for swift-crypto to build on Windows.

Fixes apple#369
gen/bcm/sha512-armv8-win.S
gen/bcm/vpaes-armv8-win.S
gen/crypto/chacha-armv8-win.S
gen/crypto/chacha20_poly1305_armv8-win.S)
Copy link
Contributor

Choose a reason for hiding this comment

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

These files are generated automatically by this script in swift-nio. I think this first needs a patch to swift-nio to ensure that this script can actually generate these two stanzas. Are you open to making that change?

Copy link
Author

Choose a reason for hiding this comment

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

I edited the file here to be more friendly for the script. I opened apple/swift-nio#3275 but I could not figure out how to test it.

@Steelskin
Copy link
Author

FYI I hit a compiler crash with this, see swiftlang/swift#82589

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.

Windows Support
2 participants