From 6aa4e8c2404810f9af2b96912209db6d184c6782 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 17 Dec 2022 20:17:50 +0100 Subject: [PATCH] Don't built shared library for WASI --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 639121ee..5aef0225 100644 --- a/build.zig +++ b/build.zig @@ -1,5 +1,4 @@ const std = @import("std"); -const builtin = @import("builtin"); const fmt = std.fmt; const fs = std.fs; const heap = std.heap; @@ -16,10 +15,11 @@ pub fn build(b: *std.build.Builder) !void { const static = b.addStaticLibrary("sodium", null); const shared = b.addSharedLibrary("sodium", null, .unversioned); - shared.strip = true; static.strip = true; + shared.strip = true; - const libs = [_]*LibExeObjStep{ static, shared }; + const libs_ = [_]*LibExeObjStep{ static, shared }; + const libs = if (target.getOsTag() == .wasi) libs_[0..1] else libs_[0..]; const prebuilt_version_file_path = "builds/msvc/version.h"; const version_file_path = "include/sodium/version.h";