Build shared libraries again, even on Windows
This commit is contained in:
parent
4388ef37db
commit
4936130b91
10
build.zig
10
build.zig
@ -22,7 +22,13 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
.optimize = optimize,
|
.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 prebuilt_version_file_path = "builds/msvc/version.h";
|
||||||
const version_file_path = "include/sodium/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| {
|
for (libs) |lib| {
|
||||||
b.installArtifact(lib);
|
b.installArtifact(lib);
|
||||||
if (optimize != .Debug) {
|
if (optimize != .Debug and !target.isWindows() and lib != static) {
|
||||||
lib.strip = true;
|
lib.strip = true;
|
||||||
}
|
}
|
||||||
lib.linkLibC();
|
lib.linkLibC();
|
||||||
|
Loading…
Reference in New Issue
Block a user