diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-20 10:27:35 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-20 16:54:00 +0200 |
| commit | 3a5d0f7700dc28b523e17ba461874b807786b939 (patch) | |
| tree | 3f5c2aa584c7b652fa410cb6b9a214af300b963b /lib/std | |
| parent | f291b8b9bccf223418eaeea2efc8ca87851e59eb (diff) | |
| download | zig-3a5d0f7700dc28b523e17ba461874b807786b939.tar.gz zig-3a5d0f7700dc28b523e17ba461874b807786b939.zip | |
wasm: link dynamically by default when targeting wasm
This matches the behaviour of other languages and leaves us
the ability to create actual static Wasm archives with
```
zig build-lib -static some.zig
```
which can then be combined with other Wasm object files and linked
into either a Wasm lib or executable using `wasm-ld`.
Update langref to reflect the fact we now ship WASI libc.
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/zig.zig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/std/zig.zig b/lib/std/zig.zig index 61e7ca5545..083803e0c8 100644 --- a/lib/std/zig.zig +++ b/lib/std/zig.zig @@ -165,9 +165,7 @@ pub fn binNameAlloc(allocator: *std.mem.Allocator, options: BinNameOptions) erro .Static => return std.fmt.allocPrint(allocator, "{s}{s}.a", .{ target.libPrefix(), root_name, }), - .Dynamic => return std.fmt.allocPrint(allocator, "{s}{s}.wasm", .{ - target.libPrefix(), root_name, - }), + .Dynamic => return std.fmt.allocPrint(allocator, "{s}.wasm", .{root_name}), } }, .Obj => return std.fmt.allocPrint(allocator, "{s}{s}", .{ root_name, target.oFileExt() }), |
