From fbd96907c9f53f01c211e6e3bbf15e53aaeb79f0 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Fri, 21 May 2021 20:24:13 +0200 Subject: 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. --- src/main.zig | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/main.zig') 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. -- cgit v1.2.3