score:0

short answer: makefile.

but i guess neon assemblies are a bigger issue.

using intrinsics instead is at least open to the possibility to link to a simulator library, and there are indeed a lot of such libraries written in standard c that allow code with intrinsics to be portable.

however the poor performance of gcc neon intrinsics forces a lot of people to sacrifice portability for performance.

if your code unfortunately contains assembly, you won't be able to even compile the code before translating assemblies back to standard c.

score:1

as noted above you need a makefile pointing at two different targets with different compiler options depending on the target.

you will need to ensure portability in your code.

i have accomplished this most often using cmake and outlining different compiler paths and linker flags for unit tests versus the target. this way i can also easily link in any unit test libraries while keeping them external to my target. in the end cmake produces a makefile but i'm not spending time worrying about make syntax which while i can read often seems like voodoo.

doing this entirely within a single eclipse project is possible. you need to configure your project for multiple targets with different compilers used for each and will require some coaxing to get eclipse to behave.

if you're goal is to do it entirely within eclipse i suggest reading this as a primer.

if you want to go the other route, here is a cmake primer.


Related Query

More Query from same tag