# compiler-rt: Set the symbol visibility · gitcafe/zig

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

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

Visibility: public

Requested revision: 30f2bb8464bdae0af4920752aecaf61a3319b881

Requested commit: 30f2bb8464bdae0af4920752aecaf61a3319b881

Commit: 30f2bb8464bdae0af4920752aecaf61a3319b881

Tree: 5af14df3d3c4d5037f10d1b1e32f11843d693bb3

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
compiler-rt: Set the symbol visibility

When we're compiling compiler_rt for any WebAssembly target, we do
not want to expose all the compiler-rt functions to the host runtime.
By setting the visibility of all exports to `hidden`, we allow the
linker to resolve the symbols during linktime, while not expose the
functions to the host runtime. This also means the linker can
properly garbage collect any compiler-rt function that does not get
resolved. The symbol visibility for all target remains the same as
before: `default`.

```

## Parents

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

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