Cross compilation: Difference between revisions
Content added Content deleted
(Created page with "{{draft task}} Explain the process of creating, for example, a Linux executable binary on a Windows machine, and vice versa.<br> Include details of any and all compilation and...") |
|||
Line 11: | Line 11: | ||
<span style="color: #008080;">include</span> <span style="color: #000000;">p</span><span style="color: #0000FF;">.</span><span style="color: #000000;">exw</span> |
<span style="color: #008080;">include</span> <span style="color: #000000;">p</span><span style="color: #0000FF;">.</span><span style="color: #000000;">exw</span> |
||
<!--</lang>--> |
<!--</lang>--> |
||
The platform() and machine_bits() builtins can be explictly used as runtime tests to vary code by platform |
The platform() and machine_bits() builtins can be explictly used as runtime tests to vary code by platform. |
||
The compiler tries hard to avoid omitting unnecessary binary, which is likely to be more successful when those routines are used as plainly as possible, without any and/or parts to the conditional. Likewise #ilASM{} aka inline assembly can contain guards |
|||
⚫ | |||
platform(s) where it currently simply doesn't. Likewise #ilASM{} aka inline assembly can contain guards |
|||
such as [32] to emit (only) the relevant code for different target architectures, see |
such as [32] to emit (only) the relevant code for different target architectures, see |
||
[[Conditional_structures#ilASM]] and [[Pragmatic_directives#Phix]] for more details and examples. |
[[Conditional_structures#ilASM]] and [[Pragmatic_directives#Phix]] for more details and examples. |
||
⚫ | |||
platform(s) where it currently simply does not. |
|||
Lastly, pwa.p2js can be used to transpile Phix code to Javascript for running in a web browser, with the |
Lastly, pwa.p2js can be used to transpile Phix code to Javascript for running in a web browser, with the |