I would like to have different C code for Embedded Swift and normal Swift and wondering how to add compiler check for that.
In the Swift I use #if hasFeature(Embedded)
but is there any equivalent for C?
rauhul
(Rauhul Varma)
2
We dont have anything built in AFIAK, you can manually set a define though -DEmbedded
just remember to pass compile your C code with the same defines you pass to the Swift Clang Importer via -Xcc
.
1 Like