Skip to content

Tier System: x86_64-illumos #7152

Closed
Closed

Description

@nektro

https://github.com/ziglang/zig/issues?q=is%3Aissue%20state%3Aopen%20label%3Aarch-x86_64%20label%3Aos-illumos

Tier 1

Tier 2

  • The standard library's cross-platform abstractions have implementations for this target.
  • This target has debug info capabilities and therefore produces stack traces on failed assertions and crashes.
  • libc is available for this target even when cross-compiling.
  • The CI machines automatically build the module tests for this target on every push.

Tier 3

  • The compiler can generate machine code for this target by relying on an external backend such as LLVM.
  • The linker can produce object files, libraries, and executables for this target.

Tier 4

  • The compiler can generate assembly or C source code for this target.

Activity

  1. added
    proposal
    on Nov 30, 2020
  2. added this to the 0.9.0 milestone on Nov 30, 2020
  3. changed the title [-]add support for targeting x86_64-illumos[/-] [+]Tier 1 Support for targeting x86_64-illumos[/+] on Feb 3, 2021
  4. modified the milestones: 0.9.0, 0.10.0 on May 19, 2021
  5. changed the title [-]Tier 1 Support for targeting x86_64-illumos[/-] [+]Tier 1 Support for x86_64-illumos[/+] on Sep 2, 2021
  6. gdamore commented on Jun 3, 2023

    @gdamore

    Yes please! I just started watching some videos about zig, and I'm super excited about it, but for me portability to some other systems -- especially my favorite - illumos (not that I'm biased or anything!) is important.

  7. added
    enhancement
    contributor friendly
    os-illumos
    and removed
    proposal
    on Sep 30, 2023
  8. modified the milestones: 0.15.0, 1.1.0 on Sep 30, 2023
  9. added
    tier system
    on Nov 19, 2024
  10. changed the title [-]Tier 1 Support for x86_64-illumos[/-] [+]Tier System: `x86_64-illumos`[/+] on Apr 26, 2025
  11. The-King-of-Toasters commented on Oct 26, 2025

    @The-King-of-Toasters
    Contributor

    Hello @rzezeski, me and @alexrp have been trying to unbreak building Zig on Illumos for the past couple days, and have merged some of your patches to do so. I've set up a new OmniOS VM and built llvm+clang+lld from source with the patches in omnios-extra. When building Zig with that llvm, the stage 3 compiler will fail to link to symbols in libc with the message failed to preempt symbol - relevant log here.

    In the past I remember getting around this by building the llvm libs and/or Zig with the -fPIC flag on. Unfortunately this does not work now. So I have two questions:

    1. Do you have any insight into resolving the linking issues?
    2. Why is it that the package in omnios-extra avoids this issue?

    And thanks again for keeping Zig on Illumos going.


    Build setup for llvm (based on zig-bootstrap flags). This is after merging patches for llvm and clang.

    $ cd path/to/llvm-project-21.x.x.src
    $ cat build.sh
    #!/bin/sh
    cmake -B build -G Ninja -S llvm \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_PREFIX_PATH="$HOME/local/llvm-21" \
      -DCMAKE_INSTALL_PREFIX="$HOME/local/llvm-21" \
      -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
      -DLLVM_ENABLE_BINDINGS=OFF \
      -DLLVM_ENABLE_LIBEDIT=OFF \
      -DLLVM_ENABLE_LIBPFM=OFF \
      -DLLVM_ENABLE_LIBXML2=OFF \
      -DLLVM_ENABLE_OCAMLDOC=OFF \
      -DLLVM_ENABLE_PLUGINS=OFF \
      -DLLVM_ENABLE_PROJECTS="lld;clang" \
      -DLLVM_ENABLE_Z3_SOLVER=OFF \
      -DLLVM_ENABLE_ZSTD=OFF \
      -DLLVM_INCLUDE_UTILS=OFF \
      -DLLVM_INCLUDE_TESTS=OFF \
      -DLLVM_INCLUDE_EXAMPLES=OFF \
      -DLLVM_INCLUDE_BENCHMARKS=OFF \
      -DLLVM_INCLUDE_DOCS=OFF \
      -DLLVM_TOOL_LLVM_LTO2_BUILD=OFF \
      -DLLVM_TOOL_LLVM_LTO_BUILD=OFF \
      -DLLVM_TOOL_LTO_BUILD=OFF \
      -DLLVM_TOOL_REMARKS_SHLIB_BUILD=OFF \
      -DCLANG_BUILD_TOOLS=OFF \
      -DCLANG_INCLUDE_DOCS=OFF \
      -DCLANG_INCLUDE_TESTS=OFF \
      -DCLANG_TOOL_CLANG_IMPORT_TEST_BUILD=OFF \
      -DCLANG_TOOL_CLANG_LINKER_WRAPPER_BUILD=OFF \
      -DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF \
      -DCLANG_TOOL_LIBCLANG_BUILD=OFF
    $ ./build.sh
    $ ninja -C build install

    Build flags for Zig:

    $ cd path/to/zig
    $ cmake -B build -G Ninja -S . -DCMAKE_INSTALL_PREFIX="$HOME/local/zig" -DCMAKE_PREFIX_PATH="$HOME/local/llvm-21" -DCMAKE_BUILD_TYPE=RelWithDebInfo
    $ ninja -C build

    Edit: The solution I've found is to use ZIG_STATIC_LLVM when building zig.

  12. removed
    contributor friendly
    on Oct 30, 2025
  13. removed this from the post-1.0 milestone on Oct 31, 2025
  14. The-King-of-Toasters commented on Nov 1, 2025

    @The-King-of-Toasters
    Contributor

    This target is broken as of #25592, due to Illumos not implementing a futex primitive. Should be unblocked if:

    • Io.Threaded is modified to use an alternative to futexes.
    • A basic, portable Io impl is added.
    • A new Io.Evented impl is made to use Solaris event ports.

    Prior art for event ports:

  15. alexrp commented on Nov 1, 2025

    @alexrp
    Member

    The relevant issue for that is #25760.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-x86_64enhancementos-illumostier system

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions