add -fPIC

pull/9949/head
Bart Louwers 2025-12-18 01:49:18 +01:00
parent 83cfa7d202
commit a20825c5ad
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ pub fn build(b: *std.Build) !void {
"-fno-sanitize=undefined",
"-fno-sanitize-trap=undefined",
});
if (target.result.os.tag != .windows) {
try flags.appendSlice(b.allocator, &.{
"-fPIC",
});
}
lib.addCSourceFiles(.{
.flags = flags.items,