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

Fix compiling for 32-bit ARM platforms #204

Merged
merged 2 commits into from
Apr 6, 2021
Merged

Conversation

finagolfin
Copy link
Member

I came up with the Android portion of this pull when getting the Swift toolchain cross-compiled to run on Android armv7, then found later that @uraimo had patched it similarly earlier for linux armv7, as part of broader changes. I have only taken the analogous part to Android from his patch, as that's all I needed to successfully build. I don't think this feature works without further changes though, perhaps as he added.

@uraimo, could you sign off on upstreaming the non-Android part of this pull, which I got from your patch? If there's any other changes to this repo worth adding now, let me know.

@KittyMac, if you turned up any more patches in your recent linux armv7 work, let us know.

@tomerd
Copy link
Contributor

tomerd commented Apr 5, 2021

thanks @buttaface this seems fine. one nit: looks like line alignment is not standard, could you please re-format with Xcode defaults (ctrl+i)

@finagolfin
Copy link
Member Author

I don't use Xcode, haven't had a mac in a dozen years, is there some other cross-platform tool like swift-format that does the same?

@uraimo
Copy link
Contributor

uraimo commented Apr 5, 2021

Hi, looks good to me, I've also added the rest of the initialization in FD_SET/FD_ISSET and submitted a PR to your branch.
swift-format should work here and just indent back those platform defines.

@tomerd
Copy link
Contributor

tomerd commented Apr 5, 2021

I don't use Xcode, haven't had a mac in a dozen years, is there some other cross-platform tool like swift-format that does the same?

yes. you can also use https://github.com/nicklockwood/SwiftFormat, and run it on the file you changes, e.g. swiftformat Sources/TSCUtility/FSWatch.swift

@finagolfin
Copy link
Member Author

Alright, reformatted and added @uraimo's other patch, let me know if there's anything else to tweak.

@neonichu
Copy link
Contributor

neonichu commented Apr 5, 2021

@swift-ci test

@tomerd
Copy link
Contributor

tomerd commented Apr 6, 2021

cc @drexin

Copy link
Contributor

@drexin drexin left a comment

Choose a reason for hiding this comment

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

LGTM

@tomerd tomerd merged commit 38b42c1 into swiftlang:main Apr 6, 2021
@finagolfin finagolfin deleted the arm branch April 8, 2021 19:31
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.

5 participants