commit 67c9d57e2735d4ad9846127d2fa140e61b945ee4 (tree)
parent c9e0df97f9f3cb4fff92769d0715ebba9e31be44
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Sun, 26 Oct 2025 09:50:55 +0100
Compilation: define __illumos__ for C/C++ when targeting illumos
Per the illumos GCC fork.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Compilation.zig b/src/Compilation.zig
@@ -6864,8 +6864,11 @@ fn addCommonCCArgs(
},
}
- // Homebrew targets without LLVM support; use communities's preferred macros.
switch (target.os.tag) {
+ // LLVM doesn't distinguish between Solaris and illumos, but the illumos GCC fork
+ // defines this macro.
+ .illumos => try argv.append("__illumos__"),
+ // Homebrew targets without LLVM support; use communities's preferred macros.
.@"3ds" => try argv.append("-D__3DS__"),
.vita => try argv.append("-D__vita__"),
else => {},