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

Allow cross-compiling swift-format #679

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jan 21, 2024

As usual, I did some cleanup of build-script-helper.py first. Changes are split into multiple commits.


Companion of swiftlang/swift#71042


This should build swift-format as a fat binary containing both an x86_64 and an arm64 slice in the open source toolchains.

The implementation is mostly stolen from build-script-helper.py in the sourcekit-lsp repo.

rdar://121326143

Convert the file to more modern Python, remove actions that weren’t used anymore and make it more readable in general.
This should build swift-format as a fat binary containing both an x86_64 and an arm64 slice in the open source toolchains.
Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

Thanks!

"-rpath",
"-Xlinker",
"/usr/lib/swift",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need either of the paths after this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I’m not sure. I wanted to start with the same paths that sourcekit-lsp uses and then try to simplify the paths again.

@ahoppen ahoppen merged commit 67df696 into swiftlang:main Jan 23, 2024
@ahoppen ahoppen deleted the ahoppen/build-fat-binary branch January 23, 2024 03:27
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.

3 participants