# start.zig: unconditionally import the root source file · gitcafe/zig

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

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

Visibility: public

Requested revision: fb95fd84431e399d79266d5c9c4acd8ea124399a

Requested commit: fb95fd84431e399d79266d5c9c4acd8ea124399a

Commit: fb95fd84431e399d79266d5c9c4acd8ea124399a

Tree: ee18dff0451955be7115b94bdf725dc92ae1163e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
start.zig: unconditionally import the root source file

stage1 did this by accident by unconditionally semantically analyzing
std.builtin.panic, which imports the root source file to look for a
panic handler override. But stage2 is smarter; it will only semantically
analyze std.builtin.panic if any panic calls are emitted. So for very
simple compilations, the root source file was being ignored, even if it
contained `export` functions in it.

```

## Parents

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

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