Skip to content

Tier System: hexagon-linux #21652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 of 7 tasks
Tracked by #23665
alexrp opened this issue Oct 10, 2024 · 9 comments
Open
3 of 7 tasks
Tracked by #23665

Tier System: hexagon-linux #21652

alexrp opened this issue Oct 10, 2024 · 9 comments
Labels
arch-hexagon Qualcomm Hexagon DSP contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-linux tier system Issues that track the support tier for a platform.
Milestone

Comments

@alexrp
Copy link
Member

alexrp commented Oct 10, 2024

  • Standard library support
  • libc is available even when cross-compiling
  • Stack traces work
  • All behavior tests pass
  • All standard library tests pass
  • No disabled tests
  • Enabled in CI (QEMU)

Open issues:

@alexrp alexrp added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library. os-linux arch-hexagon Qualcomm Hexagon DSP compiler-rt labels Oct 10, 2024
@alexrp alexrp added this to the unplanned milestone Oct 10, 2024
@alexrp alexrp added the backend-llvm The LLVM backend outputs an LLVM IR Module. label Oct 10, 2024
@alexrp alexrp added the tier system Issues that track the support tier for a platform. label Nov 19, 2024
@alexrp
Copy link
Member Author

alexrp commented Nov 25, 2024

Just noting that further progress on this port is basically blocked until LLVM 20 due to llvm/llvm-project#116798; we can't link anything larger than trivial freestanding programs due to it, including all module tests.

@alexrp alexrp modified the milestones: unplanned, 0.15.0 Nov 25, 2024
@androm3da
Copy link
Contributor

Just noting that further progress on this port is basically blocked until LLVM 20 due to llvm/llvm-project#116798; we can't link anything larger than trivial freestanding programs due to it, including all module tests.

This has now been backported to 19.1.5 - sorry for the inconvenience. Let me know if you come across any other issues.

@alexrp
Copy link
Member Author

alexrp commented Dec 5, 2024

This has now been backported to 19.1.5 - sorry for the inconvenience. Let me know if you come across any other issues.

Nice; I wasn't confident the backport would be accepted. Thanks!

@alexrp
Copy link
Member Author

alexrp commented Dec 5, 2024

test-c-import, test-compiler-rt, and test-universal-libc now pass.

test-behavior fails with:

test-behavior
└─ run test behavior-hexagon-linux.4.19...6.11.5-none.2.28-hexagonv60-Debug
   └─ zig test Debug hexagon-linux-none failure
error: zig: /home/alexrp/Source/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:307: llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a SimpleValueType!"' failed.

error: the following command terminated unexpectedly:
/home/alexrp/Source/ziglang/zig/zig-out/bin/zig test -ODebug -target hexagon-linux-none -mcpu baseline -Mroot=/home/alexrp/Source/ziglang/zig/test/behavior.zig --cache-dir /home/alexrp/Source/ziglang/zig/.zig-cache --global-cache-dir /home/alexrp/.cache/zig --name test -L /opt/llvm-19/lib -I /opt/llvm-19/include --zig-lib-dir /home/alexrp/Source/ziglang/zig/lib --listen=-

test-std fails with:

test-std
└─ run test std-hexagon-linux.4.19...6.11.5-none.2.28-hexagonv60-Debug
   └─ zig test Debug hexagon-linux-none failure
error: Call operand #1 has unhandled type v4i1
UNREACHABLE executed at /home/alexrp/Source/llvm-project/llvm/lib/CodeGen/CallingConvLower.cpp:137!

error: the following command terminated unexpectedly:
/home/alexrp/Source/ziglang/zig/zig-out/bin/zig test -ODebug -target hexagon-linux-none -mcpu baseline -Mroot=/home/alexrp/Source/ziglang/zig/lib/std/std.zig --cache-dir /home/alexrp/Source/ziglang/zig/.zig-cache --global-cache-dir /home/alexrp/.cache/zig --name test -L /opt/llvm-19/lib -I /opt/llvm-19/include --zig-lib-dir /home/alexrp/Source/ziglang/zig/lib --listen=-

We're probably exercising a lot of code paths in the Hexagon backend that Clang doesn't. 🙂

@alexrp
Copy link
Member Author

alexrp commented Dec 5, 2024

@alexrp
Copy link
Member Author

alexrp commented Apr 7, 2025

@alexrp alexrp changed the title Tier 1 support for hexagon-linux Tier System: hexagon-linux Apr 26, 2025
@alexrp alexrp removed standard library This issue involves writing Zig code for the standard library. backend-llvm The LLVM backend outputs an LLVM IR Module. compiler-rt labels Apr 26, 2025
@androm3da
Copy link
Contributor

Current upstream issues that affect Zig's behavior tests:

...

Another effective workaround for this limitation in lld is to use eld (https://github.com/qualcomm/eld). Is that satisfactory or does zig assume/require lld? At some time in the not-too-distant future (21.0?), clang should pick eld as the default linker for hexagon (see llvm/llvm-project#135200).

@alexrp
Copy link
Member Author

alexrp commented May 2, 2025

The only external linker we can depend on currently is LLD and that's because we link it into the zig executable. But the plan is to eliminate that dependency over the coming release cycles in favor of our self-hosted linker (#8726).

@androm3da
Copy link
Contributor

The only external linker we can depend on currently is LLD and that's because we link it into the zig executable. But the plan is to eliminate that dependency over the coming release cycles in favor of our self-hosted linker (#8726).

Okay, then - we'll get the trampolines sorted in lld.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-hexagon Qualcomm Hexagon DSP contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-linux tier system Issues that track the support tier for a platform.
Projects
None yet
Development

No branches or pull requests

2 participants