# fix double linking of compiler-rt symbols on wasm · gitcafe/zig

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

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

Visibility: public

Requested revision: 80ba9f060d81e8c5674acb4eb07c833d26121462

Requested commit: 80ba9f060d81e8c5674acb4eb07c833d26121462

Commit: 80ba9f060d81e8c5674acb4eb07c833d26121462

Tree: 92b3138a76cdf0a3befc721229501e286e7d5035

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix double linking of compiler-rt symbols on wasm

The include_compiler_rt stored in the bin file options means that we need
compiler-rt symbols *somehow*. However, in the context of using the stage1 backend
we need to tell stage1 to include compiler-rt only if stage1 is the place that
needs to provide those symbols. Otherwise the stage2 infrastructure will take care
of it in the linker, by putting compiler_rt.o into a static archive, or linking
compiler_rt.a against an executable. In other words we only want to set this flag
for stage1 if we are using build-obj.

```

## Parents

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

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