On Saturday, 3 June 2017 at 11:58:14 UTC, Manu wrote:
Is it possible to convince the compiler to emit code built for
the backend target directly into the same object file as the
host code?
I feel like this should be possible, along the lines of
__attribute__((target(...)) to convince the compiler to
generate code for a few functions with different targets than
the module?
Alas no. __attribute__((target(...)) works because it targeting
different targets of the _same_ backend, this targets different
backends.
Using solutions as you suggest above introduces dependent build
sequencing into the build script. Different build systems might
prove to be more or less difficult to integrate cleanly, and
many people use build-script generators which might need to
learn a few new tricks.
Hence why I made reading from disk (with a predictable output
name) a viable option.
Any build script trickery would simply just feed in slightly
later down the pipeline of.
read file from disk -> in memory -> compute API -> binary ->
execute
Also thats how using other kernels not written in D would work,
just plug somewhere into the pipeline.
'Expertise' is possibly not the word I'd suggest ;)
But I'll have some established software by that time that I'd
love to attempt to port, we can work through rough edges
together when you're available. No rush.
Great. Heh, still more experience than I have. Looking forward to
it, earliest would probably be August.