build.zig | 2 +- doc/docgen.zig | 83 +-- doc/langref.html.in | 30 +- lib/std/build.zig | 239 ++++--- lib/std/build/run.zig | 2 +- lib/std/build/translate_c.zig | 14 +- lib/std/builtin.zig | 57 +- lib/std/c.zig | 27 +- lib/std/c/linux.zig | 2 +- lib/std/child_process.zig | 26 +- lib/std/cstr.zig | 4 +- lib/std/debug.zig | 24 +- lib/std/dynamic_library.zig | 8 +- lib/std/elf.zig | 35 +- lib/std/event/channel.zig | 2 +- lib/std/event/future.zig | 2 +- lib/std/event/lock.zig | 2 +- lib/std/event/loop.zig | 26 +- lib/std/fmt/parse_float.zig | 2 +- lib/std/fs.zig | 46 +- lib/std/fs/file.zig | 12 +- lib/std/fs/get_app_data_dir.zig | 2 +- lib/std/fs/path.zig | 38 +- lib/std/fs/watch.zig | 8 +- lib/std/heap.zig | 14 +- lib/std/io.zig | 6 +- lib/std/io/test.zig | 2 +- lib/std/math/fabs.zig | 2 +- lib/std/math/isinf.zig | 6 +- lib/std/math/isnan.zig | 2 +- lib/std/mutex.zig | 4 +- lib/std/net.zig | 2 +- lib/std/net/test.zig | 4 +- lib/std/os.zig | 164 ++--- lib/std/os/bits.zig | 4 +- lib/std/os/linux.zig | 2 +- lib/std/os/test.zig | 16 +- lib/std/packed_int_array.zig | 4 +- lib/std/process.zig | 26 +- lib/std/reset_event.zig | 6 +- lib/std/special/c.zig | 8 +- lib/std/special/compiler_rt.zig | 18 +- lib/std/special/compiler_rt/addXf3_test.zig | 4 +- lib/std/special/compiler_rt/extendXfYf2_test.zig | 2 +- lib/std/special/compiler_rt/fixtfdi_test.zig | 2 +- lib/std/special/compiler_rt/fixtfsi_test.zig | 2 +- lib/std/special/compiler_rt/fixtfti_test.zig | 2 +- lib/std/special/compiler_rt/fixunstfdi_test.zig | 2 +- lib/std/special/compiler_rt/fixunstfsi_test.zig | 2 +- lib/std/special/compiler_rt/fixunstfti_test.zig | 2 +- lib/std/special/compiler_rt/floattitf_test.zig | 2 +- lib/std/special/compiler_rt/floatuntitf_test.zig | 2 +- lib/std/special/compiler_rt/mulXf3_test.zig | 2 +- lib/std/special/compiler_rt/truncXfYf2.zig | 12 +- lib/std/special/compiler_rt/truncXfYf2_test.zig | 4 +- lib/std/special/init-exe/build.zig | 10 + lib/std/special/init-exe/src/main.zig | 2 +- lib/std/spinlock.zig | 2 +- lib/std/start.zig | 16 +- lib/std/target.zig | 1223 ++++++++++++++++---------------- lib/std/testing.zig | 10 +- lib/std/thread.zig | 20 +- lib/std/time.zig | 18 +- lib/std/zig.zig | 9 +- lib/std/zig/cross_target.zig | 835 ++++++++++++++++++++++ lib/std/zig/system.zig | 614 +++++++++++++++- src-self-hosted/c_int.zig | 2 +- src-self-hosted/clang.zig | 2 +- src-self-hosted/introspect.zig | 10 +- src-self-hosted/libc_installation.zig | 126 +--- src-self-hosted/link.zig | 4 +- src-self-hosted/main.zig | 6 +- src-self-hosted/print_targets.zig | 12 +- src-self-hosted/stage2.zig | 403 +++++++---- src-self-hosted/util.zig | 22 - src/all_types.hpp | 3 - src/analyze.cpp | 43 +- src/codegen.cpp | 112 +-- src/codegen.hpp | 2 - src/compiler.cpp | 25 - src/compiler.hpp | 1 - src/error.cpp | 2 + src/glibc.cpp | 63 +- src/glibc.hpp | 5 +- src/link.cpp | 131 +--- src/main.cpp | 66 +- src/stage2.cpp | 115 ++- src/stage2.h | 22 +- src/target.cpp | 108 +-- src/target.hpp | 5 +- test/assemble_and_link.zig | 4 +- test/cli.zig | 5 +- test/compare_output.zig | 9 +- test/compile_errors.zig | 25 +- test/src/translate_c.zig | 5 +- test/stack_traces.zig | 77 +- test/stage1/behavior/asm.zig | 7 +- test/stage1/behavior/byteswap.zig | 5 +- test/stage1/behavior/math.zig | 20 +- test/stage1/behavior/namespace_depends_on_compile_var.zig | 8 +- test/stage1/behavior/vector.zig | 3 +- test/standalone.zig | 4 +- test/tests.zig | 193 ++--- test/translate_c.zig | 24 +- 104 files changed, 3338 insertions(+), 2123 deletions(-)