# stage2 now supports using stage1 as a backend for compiling zig code · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2ef68631cb7045c277b348777b1a064845b95cd8)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2ef68631cb7045c277b348777b1a064845b95cd8

Requested commit: 2ef68631cb7045c277b348777b1a064845b95cd8

Commit: 2ef68631cb7045c277b348777b1a064845b95cd8

Tree: 00e1dca9b53a828a9926cf5b6d2a227dc939375a

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2 now supports using stage1 as a backend for compiling zig code

 * move stage2.cpp code into zig0.cpp for simplicity
 * add -ftime-report and some more CLI options to stage2
 * stage2 compites the llvm cpu features string
 * classifyFileExt understands more file extensions
 * correction to generateBuiltinZigSource using the wrong allocator
   (thanks dbandstra!)
 * stage2 is now able to build hello.zig into hello.o using stage1 as a
   library however it fails linking due to missing compiler-rt
 * remove dead code
 * simplify zig0 builtin.zig source
 * fix not resolving builtin.zig source path causing duplicate imports
 * fix stage1.h not being valid C code
 * fix stage2.h not being valid C code

```

## Parents

- [333b12a8f9beb5864fa05ce413c5b935e925ec14](https://git.cafe/gitcafe/zig/commit/333b12a8f9beb5864fa05ce413c5b935e925ec14?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2ef68631cb7045c277b348777b1a064845b95cd8?format=markdown)
