diff options
| author | Stephen Gregoratto <dev@sgregoratto.me> | 2023-10-01 23:09:14 +1100 |
|---|---|---|
| committer | Ryan Zezeski <ryan@zinascii.com> | 2023-10-02 15:31:49 -0600 |
| commit | 285970982a662ae1882858ab8076b8c20609b9bb (patch) | |
| tree | 5141c17d8bbb44b401bbda3cbbfdf7dc73106a8a /src/zig_llvm.cpp | |
| parent | 51fa7ef1c43c2b159cfba15ee06cd6f3fab3e556 (diff) | |
| download | zig-285970982a662ae1882858ab8076b8c20609b9bb.tar.gz zig-285970982a662ae1882858ab8076b8c20609b9bb.zip | |
Add illumos OS tag
- Adds `illumos` to the `Target.Os.Tag` enum. A new function,
`isSolarish` has been added that returns true if the tag is either
Solaris or Illumos. This matches the naming convention found in Rust's
`libc` crate[1].
- Add the tag wherever `.solaris` is being checked against.
- Check for the C pre-processor macro `__illumos__` in CMake to set the
proper target tuple. Illumos distros patch their compilers to have
this in the "built-in" set (verified with `echo | cc -dM -E -`).
Alternatively you could check the output of `uname -o`.
Right now, both Solaris and Illumos import from `c/solaris.zig`. In the
future it may be worth putting the shared ABI bits in a base file, and
mixing that in with specific `c/solaris.zig`/`c/illumos.zig` files.
[1]: https://github.com/rust-lang/libc/tree/6e02a329a2a27f6887ea86952f389ca11e06448c/src/unix/solarish
Diffstat (limited to 'src/zig_llvm.cpp')
0 files changed, 0 insertions, 0 deletions
