# build: add \`\-Donly-c\` option · gitcafe/zig

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

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

Visibility: public

Requested revision: 4f04759c874d5fd41c7cadeb974b4459559bc2a7

Requested commit: 4f04759c874d5fd41c7cadeb974b4459559bc2a7

Commit: 4f04759c874d5fd41c7cadeb974b4459559bc2a7

Tree: e3a5e2f56b6ede2f4aa8c71d59856b42f48761c2

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
build: add `-Donly-c` option

This option can be used to produce a C backend build of the self-hosted
compiler, which only has the C backend enabled. Once the C backend is
capable of self-hosting, this will be a way for us to replace our stage1
codebase with a C backend build of self-hosted, which we can then use
for bootstrapping. See #5246 for more details.

Using this option right now results in a crash because the C backend is
not yet passing all the behavior tests.

```

## Parents

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

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