diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-04-07 21:19:12 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-04-08 13:20:14 -0400 |
| commit | fcdb7027e9f606cf0f4415daee73cb717affe69e (patch) | |
| tree | 8bbcc034da247436ae77b10fb19321cb443d49a7 /lib/std | |
| parent | 0c83fa2fd03fec86c4e36075978646f202deec32 (diff) | |
| download | zig-fcdb7027e9f606cf0f4415daee73cb717affe69e.tar.gz zig-fcdb7027e9f606cf0f4415daee73cb717affe69e.zip | |
haiku: fix linking issues
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/Target.zig | 7 | ||||
| -rw-r--r-- | lib/std/zig/system/NativePaths.zig | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 842442e37b..55cde46308 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -2740,6 +2740,13 @@ pub fn is_libc_lib_name(target: std.Target, name: []const u8) bool { return true; } + if (target.os.tag == .haiku) { + if (eqlIgnoreCase(ignore_case, name, "root")) + return true; + if (eqlIgnoreCase(ignore_case, name, "network")) + return true; + } + return false; } diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig index 9d9ab22812..2a50e27b0c 100644 --- a/lib/std/zig/system/NativePaths.zig +++ b/lib/std/zig/system/NativePaths.zig @@ -105,6 +105,13 @@ pub fn detect(arena: Allocator, native_target: std.Target) !NativePaths { return self; } + if (builtin.os.tag == .haiku) { + try self.addLibDir("/system/non-packaged/lib"); + try self.addLibDir("/system/develop/lib"); + try self.addLibDir("/system/lib"); + return self; + } + if (builtin.os.tag != .windows and builtin.os.tag != .wasi) { const triple = try native_target.linuxTriple(arena); |
