mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Build shared libraries again, even on Windows
This commit is contained in:
@@ -22,7 +22,13 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const libs = [_]*LibExeObjStep{static};
|
||||
const shared = b.addSharedLibrary(.{
|
||||
.name = if (target.isWindows()) "sodium_shared" else "sodium",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const libs = [_]*LibExeObjStep{ static, shared };
|
||||
|
||||
const prebuilt_version_file_path = "builds/msvc/version.h";
|
||||
const version_file_path = "include/sodium/version.h";
|
||||
@@ -33,7 +39,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
|
||||
for (libs) |lib| {
|
||||
b.installArtifact(lib);
|
||||
if (optimize != .Debug) {
|
||||
if (optimize != .Debug and !target.isWindows() and lib != static) {
|
||||
lib.strip = true;
|
||||
}
|
||||
lib.linkLibC();
|
||||
|
||||
Reference in New Issue
Block a user