build: fix pkgs for FBSD port runs

pull/10081/head
-k 2025-12-28 07:21:58 -05:00
parent 38664afde0
commit e63a4ab774
No known key found for this signature in database
GPG Key ID: C18AF0DBE1CFDC16
4 changed files with 16 additions and 0 deletions

View File

@ -72,6 +72,10 @@ pub fn build(b: *std.Build) !void {
});
}
if (target.result.os.tag == .freebsd) {
try flags.append(b.allocator, "-fPIC");
}
if (imgui_) |imgui| {
lib.addCSourceFile(.{ .file = b.path("vendor/cimgui.cpp"), .flags = flags.items });
lib.addCSourceFile(.{ .file = imgui.path("imgui.cpp"), .flags = flags.items });

View File

@ -90,6 +90,10 @@ fn buildLib(b: *std.Build, module: *std.Build.Module, options: anytype) !*std.Bu
"-fno-sanitize=undefined",
});
if (target.result.os.tag == .freebsd) {
try flags.append(b.allocator, "-fPIC");
}
const dynamic_link_opts = options.dynamic_link_opts;
// Zlib

View File

@ -66,6 +66,10 @@ fn buildGlslang(
"-fno-sanitize-trap=undefined",
});
if (target.result.os.tag == .freebsd) {
try flags.append(b.allocator, "-fPIC");
}
if (upstream_) |upstream| {
lib.addCSourceFiles(.{
.root = upstream.path(""),

View File

@ -74,6 +74,10 @@ fn buildSpirvCross(
"-fno-sanitize-trap=undefined",
});
if (target.result.os.tag == .freebsd) {
try flags.append(b.allocator, "-fPIC");
}
if (b.lazyDependency("spirv_cross", .{})) |upstream| {
lib.addIncludePath(upstream.path(""));
module.addIncludePath(upstream.path(""));