zig/doc/targets.md
Andrew Kelley 1053172854 parseh handles typedef void better
and introduce c_long_double type
2016-01-31 15:44:02 -07:00

21 lines
868 B
Markdown

# How to Add Support For More Targets
Create bootstrap code in std/bootstrap.zig and add conditional compilation
logic. This code is responsible for the real executable entry point, calling
main(argc, argv, env) and making the exit syscall when main returns.
How to pass a byvalue struct parameter in the C calling convention is
target-specific. Add logic for how to do function prototypes and function calls
for the target when an exported or external function has a byvalue struct.
Write the target-specific code in std.zig.
Update the C integer types to be the correct size for the target.
Add the conditional compilation code for the page size global. It is hardcoded
for each target.
Make sure that parseh sends the correct command line parameters to libclang for
the given target.
Make sure that `c_long_double` codegens the correct floating point value.