zig/doc/targets.md
Andrew Kelley f1d338194e rewrite how importing works
* Introduce the concept of packages. Closes #3
 * Add support for error notes.
 * Introduce `@import` and `@c_import` builtin functions and
   remove the `import` and `c_import` top level declarations.
 * Introduce the `use` top level declaration.
 * Add `--check-unused` parameter to perform semantic
   analysis and codegen on all top level declarations, not
   just exported ones and ones referenced by exported ones.
 * Delete the root export node and add `--library` argument.
2016-03-01 03:13:40 -07:00

685 B

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 the standard library.

Update the C integer types to be the correct size for the target.

Make sure that c_long_double codegens the correct floating point value.