# stage2: add initial impl for generating global decls in LLVM backend · gitcafe/zig

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

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

Visibility: public

Requested revision: 70f6d16ae2d2d9bf8690742c7eba2798b5395174

Requested commit: 70f6d16ae2d2d9bf8690742c7eba2798b5395174

Commit: 70f6d16ae2d2d9bf8690742c7eba2798b5395174

Tree: cfd702d3a961fc70c4c6b73bb207776cd6338fe2

Author: Timon Kruiper

Committer: Timon Kruiper

## Message

````
stage2: add initial impl for generating global decls in LLVM backend

Also adds support for extern functions, simple pointer and simple array
types and values.

A simple hello world now compiles:
`zig build-exe example.zig -fLLVM -lc`
```
extern fn puts(s: [*:0]const u8) c_int;
export fn main() c_int {
    _ = puts("hello world!");
    return 0;
}
```

````

## Parents

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

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