mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
build.zig: build only static libraries
This commit is contained in:
@@ -16,21 +16,13 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
const enable_benchmarks = b.option(bool, "enable_benchmarks", "Whether tests should be benchmarks.") orelse false;
|
||||
const benchmarks_iterations = b.option(u32, "iterations", "Number of iterations for benchmarks.") orelse 200;
|
||||
|
||||
const shared = b.addSharedLibrary(.{
|
||||
.name = if (target.isWindows()) "sodium_shared" else "sodium",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
const static = b.addStaticLibrary(.{
|
||||
.name = "sodium",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
shared.strip = true;
|
||||
static.strip = true;
|
||||
|
||||
const libs_ = [_]*LibExeObjStep{ shared, static };
|
||||
const libs = if (target.getOsTag() == .wasi) libs_[1..] else libs_[0..];
|
||||
const libs = [_]*LibExeObjStep{static};
|
||||
|
||||
const prebuilt_version_file_path = "builds/msvc/version.h";
|
||||
const version_file_path = "include/sodium/version.h";
|
||||
|
||||
Reference in New Issue
Block a user