From 67c9d57e2735d4ad9846127d2fa140e61b945ee4 Mon Sep 17 00:00:00 2001 From: Alex Rønne Petersen Date: Sun, 26 Oct 2025 09:50:55 +0100 Subject: Compilation: define __illumos__ for C/C++ when targeting illumos Per the illumos GCC fork. --- src/Compilation.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 5925a80f08..760c8f8b11 100644 --- 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 => {}, -- cgit v1.2.3