Skip to content

Commit 7013710

Browse files
authored
fix: force_pic option behaviour (#19)
1 parent f7f360a commit 7013710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ fn addRocksDB(
4848
.link_libcpp = true,
4949
});
5050

51-
const force_pic = b.option(bool, "force_pic", "Forces PIC for the libraries");
51+
const force_pic = b.option(bool, "force_pic", "Forces PIC enabled for the libraries");
5252
const static_rocksdb = b.addLibrary(.{
5353
.name = "rocksdb",
5454
.linkage = .static,
5555
.root_module = b.createModule(.{
5656
.target = target,
5757
.optimize = optimize,
58-
.pic = force_pic,
58+
.pic = if (force_pic == true) true else null,
5959
}),
6060
});
6161
const dynamic_rocksdb = b.addLibrary(.{
@@ -64,7 +64,7 @@ fn addRocksDB(
6464
.root_module = b.createModule(.{
6565
.target = target,
6666
.optimize = optimize,
67-
.pic = force_pic,
67+
.pic = if (force_pic == true) true else null,
6868
}),
6969
});
7070

0 commit comments

Comments
 (0)