Skip to content

[embedded] Start building embedded support on Linux/ELF, expand archs of the embedded stdlib to cover common embedded targets #69973

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

Merged
merged 4 commits into from
Nov 27, 2023

Conversation

kubamracek
Copy link
Contributor

There is nothing Apple / Mach-O specific in the Embedded Swift setup, let's enable the Embedded Swift support in the Linux toolchains and start building the embedded stdlib for ELF, too.

@kubamracek kubamracek requested review from ktoso, kavon and a team as code owners November 18, 2023 05:50
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek requested a review from phausler November 18, 2023 05:50
@kubamracek kubamracek added the embedded Embedded Swift label Nov 18, 2023
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@finagolfin
Copy link
Member

Nice, any plans to set up a CI that runs the compiler tests on actual hardware? At least, it would be nice to have a 32-bit non-embedded CI set up, that could run all the native executable tests too. I don't think anybody is doing that right now, unless there's still a 32-bit watchOS CI running internally right now somewhere.

I think it wouldn't be hard to set up a linux armv7 CI on one of the existing linux AArch64 images, since 64-bit distros usually support building and running 32-bit binaries also.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek
Copy link
Contributor Author

Nice, any plans to set up a CI that runs the compiler tests on actual hardware?

As in, on an actual embedded board? I think we're probably pretty far from being able to run reliable and fast enough tests on those as part of the main Swift CI. But it's certainly an idea worth exploring, yes. Maybe there is some good answer by using an emulator?

At least, it would be nice to have a 32-bit non-embedded CI set up, that could run all the native executable tests too. I don't think anybody is doing that right now, unless there's still a 32-bit watchOS CI running internally right now somewhere.

I think it wouldn't be hard to set up a linux armv7 CI on one of the existing linux AArch64 images, since 64-bit distros usually support building and running 32-bit binaries also.

This seems tractable. I wonder if @shahmishal has any thoughts on that?

@kubamracek kubamracek merged commit f7c5831 into swiftlang:main Nov 27, 2023
@DougGregor
Copy link
Member

I think this is causing failures on the incremental bots, which look like:

<unknown>:0: error: fatal error encountered during compilation; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
<unknown>:0: note: No available targets are compatible with triple "riscv32-none-none-eabi"

I put up what I think is a fix at #70057, and am going to kick off testing of a revert PR in case that isn't right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded Embedded Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants