Introduce embedded development using Swift

Did anyone work on getting Swift usable on RISC-V yet? In particular the ESP-C3 looks like an interesting target.

4 Likes

I've build Swift for RISCV64 and Buildroot. The caveat is that I only was able to compile targeting Soft Float.

3 Likes

In the previous release, I added flags to the Swift frontend, but I found that there were standard flags later.

Now I use -Xcc -mhard-float, -Xcc -mfloat-abi=hard flags to tell the compiler to generate hard float instruction and ABI. I don't know if this would work in RISCV64.

2 Likes

I did try that, it was an issue of Clang assuming soft float for Swift when specifying the triple. Wasn't a dealbreaker for me.

3 Likes