-
Notifications
You must be signed in to change notification settings - Fork 15
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
armhf support #65
Comments
This would definitely require a Swift toolchain build, which I'm actually interested in supporting in the generator eventually. Are you targeting a specific Linux distribution? Would you be able to clarify what that is and its exact version for development and testing? |
I'm building on Ubuntu 22.04.3 |
I'm also interested in this but have been unable to build a full toolchain for Swift for armhf. We have been able to build llvm, swift, and the core libraries for armhf to be able to put together a simple sysroot for Debian 11 and 12, but beyond that that we don't have any other tools built. I wonder how much of a toolchain we actually need to support armhf/armv7 as a cross-compilation target with this SDK generator? @MaxDesiatov do you know what we'd need? |
Do you have a preset for that platform defined in the presets file? https://github.com/swiftlang/swift/blob/main/utils/build-presets.ini Core libraries should be enough in theory, and if those can be built with a readily available preset, it would simplify the generator setup a lot. |
I don't have anything in build-presents.ini, instead we've been using cmake due to the fact that it's actually possible to cross compile for armv7 without too much pain. Is it even possible to cross compile using buildbot? If not then that takes it away as an option... |
Everything buildable with a preset locally can be built with a buildbot too, I'm not aware of any differences between those two cases that would preclude cross-compilation. |
In my experience using build presets with buildbot to try to cross compile armv7 is a pain. There's always an issue of LLVM not finding something, some path being wrong, or it straight up doing a step that doesn't work for cross compilation. I will continue looking at it, but I wonder if the generator would work if I just pointed it to some artifacts that were built with cmake that are for armv7...which would include Swift stdlib, dispatch, foundation, and xctest. |
@MaxDesiatov I have a buildbot profile that can generate the Swift stdlib and corelibs (dispatch, foundation, xctest) for armv7 that can be used for cross-compilation. It does require a separate armhf sysroot of Ubuntu/Debian (possibly even Fedora) but this can be used on a CI system as well. I am working on creating a pull request to swiftlang/swift with these changes, but I still wonder how having this would help to create an SDK generator for it? Here are the directories that are generated from the buildbot in <install_destdir>/usr/lib/swift/linux:
I'm guessing that the armv7* files could probably be copied into swift.xctoolchain correct? And I'd imagine then that the *.so files for armv7 could then go into the SDK for the target. What do you think- how should this be setup? |
Can you include a preset that produces this output in your pull request and link that PR from here? Thanks! |
How difficult would it be to add
armhf
target architecture support (for Linux)?The text was updated successfully, but these errors were encountered: