aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-10-26 09:50:55 +0100
committerAlex Rønne Petersen <alex@alexrp.com>2025-10-26 09:51:35 +0100
commit67c9d57e2735d4ad9846127d2fa140e61b945ee4 (patch)
tree74cd44824ab09f0c89dec14bbe8be8ae8b401f62 /src/Compilation.zig
parentc9e0df97f9f3cb4fff92769d0715ebba9e31be44 (diff)
downloadzig-67c9d57e2735d4ad9846127d2fa140e61b945ee4.tar.gz
zig-67c9d57e2735d4ad9846127d2fa140e61b945ee4.zip
Compilation: define __illumos__ for C/C++ when targeting illumos
Per the illumos GCC fork.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig5
1 files changed, 4 insertions, 1 deletions
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 => {},