Cross-compiling
The compiler features that we've explored so far have been built only for the current platform. This means that when developing on Linux, the compiler will create (and run, if requested) a native Linux binary (known technically as ELF). If executed on macOS, the result will be a native binary for darwin (a Mach-O executable), and on Windows it would be a native binary for the Windows platform (PE32+). If developers wish to target many different platforms, one option is to have a different computer for each build, but this is expensive and time-consuming. It's far more convenient to create native binary applications for various platforms from the developer's computer—this is called cross-compiling.
Cross-compiling with the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access