diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-21 20:24:13 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-21 20:24:13 +0200 |
| commit | fbd96907c9f53f01c211e6e3bbf15e53aaeb79f0 (patch) | |
| tree | 1ec06e6689a76031e6a39ee330c04bfc031809fc /src/main.zig | |
| parent | 4b69bd61e41f1a49bb0b00ac00a7e499ab7974a7 (diff) | |
| download | zig-fbd96907c9f53f01c211e6e3bbf15e53aaeb79f0.tar.gz zig-fbd96907c9f53f01c211e6e3bbf15e53aaeb79f0.zip | |
wasm: build static archive unless -dynamic specified
This matches the behaviour for other targets in that
```
zig build-lib math.zig -target wasm32-freestanding
```
produces now `libmath.a` while
```
zig build-lib math.zig -dynamic -target wasm32-freestanding
```
is required to create a loadable Wasm module.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig index 86d017b3b7..b388329508 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1548,12 +1548,6 @@ fn buildOutputType( link_libcpp = true; } - if (cross_target.getCpuArch().isWasm() and output_mode == .Lib and link_mode == null) { - // If link_mode is unspecified, always link as dynamic library when targeting Wasm, - // so that wasm-ld is invoked rather than standard archiver. - link_mode = .Dynamic; - } - // Now that we have target info, we can find out if any of the system libraries // are part of libc or libc++. We remove them from the list and communicate their // existence via flags instead. |
