# improvements to build-lib use case of WebAssembly · gitcafe/zig

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

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

Visibility: public

Requested revision: 81e960eb748fdb37d1d61da262ec343e2fdb2511

Requested commit: 81e960eb748fdb37d1d61da262ec343e2fdb2511

Commit: 81e960eb748fdb37d1d61da262ec343e2fdb2511

Tree: ed4059af1ce6181457887bbfbf98a17b3bbfcf44

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
improvements to build-lib use case of WebAssembly

 * build-exe does include the startup code that supplies _start for the
   wasm32-freestanding target. Previously this did not occur because
   of logic excluding "freestanding".
 * build-lib for wasm32-freestanding target gets linked by LLD. To avoid
   infinite recursion, compiler_rt and zig libc are built as objects
   rather than libraries.
   - no "lib" prefix and ".wasm" extension instead of ".a". Rather than
   build-lib foo.zig producing "libfoo.a", now it produces "foo.wasm".
 * go back to using `.o` extension for webassembly objects
 * zig libc only provides _start symbol for wasm when linking libc.

```

## Parents

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

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