build: fix `simdutf`/`highway` flags

pull/9993/head
-k 2025-12-21 17:11:34 -05:00
parent 028691766d
commit d0767a089a
No known key found for this signature in database
GPG Key ID: C18AF0DBE1CFDC16
2 changed files with 9 additions and 0 deletions

View File

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

View File

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